mirror of
https://github.com/clearlinux/swupd-server.git
synced 2026-10-04 07:58:32 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ac1869adf | ||
|
|
fde00265e2 | ||
|
|
25d3ef658d | ||
|
|
3cf2ade205 | ||
|
|
e814a73480 |
@@ -1,3 +1,12 @@
|
|||||||
|
With the release of mixer-tools v4.3.0 [1] the swupd-server project is
|
||||||
|
deprecated. All functionality has been re-written into the mixer tool under
|
||||||
|
the `mixer build update` command. All development done around creating update
|
||||||
|
content consumed by swupd-client is now done in that project.
|
||||||
|
|
||||||
|
[1] https://github.com/clearlinux/mixer-tools
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
The swupd-server package provides a reference implementation of a software
|
The swupd-server package provides a reference implementation of a software
|
||||||
update server-side component that generates update content consumable by a
|
update server-side component that generates update content consumable by a
|
||||||
software update client (swupd-client). Such content includes manifests that
|
software update client (swupd-client). Such content includes manifests that
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ([2.66])
|
AC_PREREQ([2.66])
|
||||||
AC_INIT(swupd-server, 3.7.4, matthew.johnson@intel.com)
|
AC_INIT(swupd-server, 3.7.5, matthew.johnson@intel.com)
|
||||||
AM_INIT_AUTOMAKE([foreign -Wall -W subdir-objects])
|
AM_INIT_AUTOMAKE([foreign -Wall -W subdir-objects])
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
|||||||
+8
-1
@@ -45,6 +45,7 @@ static void runtime_state_heuristics(struct file *file)
|
|||||||
/* these are shipped directories that are not themselves state,
|
/* these are shipped directories that are not themselves state,
|
||||||
* rather only their contents are state */
|
* rather only their contents are state */
|
||||||
if ((strcmp(file->filename, "/usr/src/debug") == 0) ||
|
if ((strcmp(file->filename, "/usr/src/debug") == 0) ||
|
||||||
|
(strcmp(file->filename, "/usr/src/kernel") == 0) ||
|
||||||
(strcmp(file->filename, "/dev") == 0) ||
|
(strcmp(file->filename, "/dev") == 0) ||
|
||||||
(strcmp(file->filename, "/home") == 0) ||
|
(strcmp(file->filename, "/home") == 0) ||
|
||||||
(strcmp(file->filename, "/proc") == 0) ||
|
(strcmp(file->filename, "/proc") == 0) ||
|
||||||
@@ -56,6 +57,12 @@ static void runtime_state_heuristics(struct file *file)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* the contents of these directory are not state,
|
||||||
|
* but it belongs to a state directory */
|
||||||
|
if ((strncmp(file->filename, "/usr/src/kernel/", 16) == 0)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* the contents of these directory are state, ideally this never
|
/* the contents of these directory are state, ideally this never
|
||||||
* triggers if our package builds are clean */
|
* triggers if our package builds are clean */
|
||||||
if ((strncmp(file->filename, "/dev/", 5) == 0) ||
|
if ((strncmp(file->filename, "/dev/", 5) == 0) ||
|
||||||
@@ -72,7 +79,7 @@ static void runtime_state_heuristics(struct file *file)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* these are commonly added directories for user customizatio,
|
/* these are commonly added directories for user customization,
|
||||||
* ideally this never triggers if our package builds are clean */
|
* ideally this never triggers if our package builds are clean */
|
||||||
if ((strncmp(file->filename, "/acct", 5) == 0) ||
|
if ((strncmp(file->filename, "/acct", 5) == 0) ||
|
||||||
(strncmp(file->filename, "/cache", 6) == 0) ||
|
(strncmp(file->filename, "/cache", 6) == 0) ||
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ gendataCs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkrenamed(){
|
checkrenamed(){
|
||||||
local flags sh1 ver name fromsha1="bad" tosha1
|
local flags sha1 ver name fromsha1="bad" tosha1
|
||||||
# Check that $1 is renamed to $2
|
# Check that $1 is renamed to $2
|
||||||
exec 9< $DIR/www/20/Manifest.test-bundle
|
exec 9< $DIR/www/20/Manifest.test-bundle
|
||||||
# skip the header
|
# skip the header
|
||||||
@@ -58,11 +58,11 @@ checkrenamed(){
|
|||||||
while read -r -u9 flags sha1 ver name
|
while read -r -u9 flags sha1 ver name
|
||||||
do
|
do
|
||||||
case "$flags" in
|
case "$flags" in
|
||||||
(?"dr"?) [ "$name" = "$1" ] && fromsha1=$sha1 ;;
|
(?"d.r") [ "$name" = "$1" ] && fromsha1=$sha1 ;;
|
||||||
(?".r"?) [ "$name" = "$2" ] && tosha1=$sha1 ;;
|
(?"..r") [ "$name" = "$2" ] && tosha1=$sha1 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
if [ "$fromsh1" = "$tosha1" ] ; then return 0 ; else return 1 ; fi
|
if [ "$fromsha1" = "$tosha1" ] ; then return 0 ; else return 1 ; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Guts of doing an update
|
# Guts of doing an update
|
||||||
@@ -87,7 +87,7 @@ do_an_update() {
|
|||||||
gendataA 10 foo
|
gendataA 10 foo
|
||||||
gendataA 20 bar
|
gendataA 20 bar
|
||||||
do_an_update
|
do_an_update
|
||||||
checkrenamed foo bar
|
checkrenamed /foo /bar
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "ignore rename detection for small files" {
|
@test "ignore rename detection for small files" {
|
||||||
@@ -142,8 +142,8 @@ do_an_update() {
|
|||||||
gendataA 20 bar
|
gendataA 20 bar
|
||||||
gendataA 20 baz
|
gendataA 20 baz
|
||||||
do_an_update
|
do_an_update
|
||||||
checkrenamed foo bar
|
checkrenamed /foo /bar
|
||||||
checkrenamed foz baz
|
checkrenamed /foz /baz
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "rename two files to two, one slightly different" {
|
@test "rename two files to two, one slightly different" {
|
||||||
@@ -153,8 +153,8 @@ do_an_update() {
|
|||||||
gendataB 20 baz
|
gendataB 20 baz
|
||||||
do_an_update
|
do_an_update
|
||||||
# we don't actually know how the client we do this rename, but don't care
|
# we don't actually know how the client we do this rename, but don't care
|
||||||
checkrenamed foo bar
|
checkrenamed /foo /bar
|
||||||
checkrenamed foz baz
|
checkrenamed /foz /baz
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "rename two files to two, each pair slightly different" {
|
@test "rename two files to two, each pair slightly different" {
|
||||||
@@ -163,8 +163,8 @@ do_an_update() {
|
|||||||
gendataA 20 bar
|
gendataA 20 bar
|
||||||
gendataB 20 baz
|
gendataB 20 baz
|
||||||
do_an_update
|
do_an_update
|
||||||
checkrenamed foo bar
|
checkrenamed /foo /bar
|
||||||
checkrenamed foz baz
|
checkrenamed /foz /baz
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "rename two files to two, one very different" {
|
@test "rename two files to two, one very different" {
|
||||||
@@ -183,9 +183,9 @@ do_an_update() {
|
|||||||
gendataA 20 bar
|
gendataA 20 bar
|
||||||
gendataCs 20 baz
|
gendataCs 20 baz
|
||||||
do_an_update
|
do_an_update
|
||||||
run checkrenamed foo bar
|
run checkrenamed /foo /bar
|
||||||
if [ $status -eq 1 ] ; then
|
if [ $status -eq 1 ] ; then
|
||||||
checkrenamed foz bar
|
checkrenamed /foz /bar
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user