Commit Graph

149 Commits

Author SHA1 Message Date
Michael Tremer
ec18a1ecae pakfire: Allow pinning Pakfire to one mirror server
This patch adds a new $mirror option to the configuration file which
will cause Pakfire to only use this one to download any files.

This feature is disabled by default but useful for development.

Fixes: #12706
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:28:39 +00:00
Arne Fitzenreiter
6a21e9646f Merge remote-tracking branch 'origin/master' into next 2021-07-10 17:51:41 +00:00
Peter Müller
d0ba077ed3 Pakfire: call "sync" in function.sh after having extracted archives
After upgrading to Core Update 157, a few number of users reported their
systems to be unworkable after a reboot. Most of them (the systems, not
the users) were apparently missing the new Linux kernel in their Grub
configuration, causing a non-functional bootloader written to disk.

While we seem to be able to rule out issues related to poor storage
(SDDs, flash cards, etc.) or very high I/O load, it occurred to me we
are not calling "sync" after having extracted a Core Update's .tar.gz
file.

This patch therefore proposes to do so. It is a somewhat homeopathic
approach, though, but might ensure all parts of the system to have
properly processed the contents of an extracted archive. While we cannot
even reasonably guess it will solve the problem(s) mentioned initially,
doing so cannot hurt either.

See also:
https://community.ipfire.org/t/after-update-ipfire-to-157-no-boot/5641/45

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-07-09 13:54:39 +00:00
Michael Tremer
c639ab1d31 pakfire: Do not delay directory restore
https://www.gnu.org/software/tar/manual/tar.html#Directory-Modification-Times-and-Permissions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-07-09 13:25:00 +00:00
Michael Tremer
b6cad4d231 pakfire: Put tar options into an array
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-07-09 13:23:56 +00:00
Arne Fitzenreiter
b16ac3ba76 pakfire: switch 32bit arm to armv6l
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-07-05 07:42:40 +02:00
Stefan Schantl
d6c2e67155 pakfire: Prevent from get launched multiple times.
When pakfire gets launched a check if a so called lockfile exists and
the process will be aborted, otherwise the file will be created which
prevents any other pakfire instance to perform any operations until the
first process gets finished and the lock will be released again.

Because the release of the lock is located in an END block, the lock
also will be released in case the pakfire process gets interuped or
gains an error.

This prevents from an lock loop and an unuseable pakfire.

Reference: #12621.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-25 09:51:56 +00:00
Michael Tremer
b37678e922 Package extended attributes in distro.img and Core Updates
System capabilities are stored in extended file system attributes
which are by default not stored in tar balls.

This patch ensures that they are packaged and extracted.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-06 14:45:02 +00:00
Peter Müller
cf33650eb3 Pakfire: do not leak upstream proxy password in log messages
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-30 15:11:54 +00:00
Peter Müller
d96d5db6e5 Pakfire: fix upstream proxy usage
This patch ensures Pakfire will download updates via the configured
upstream proxy (if any) for both HTTP and HTTPS.

Fixes: #12357

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-04-30 15:11:42 +00:00
Arne Fitzenreiter
712425ff0b pakfire: Re-install previous core update when in testing mode
Fixes: #12302
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Tested-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-24 19:21:01 +00:00
Michael Tremer
152378c674 pakfire: Add version suffix when in a certain tree
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-15 11:09:02 +00:00
Michael Tremer
e6f4991be2 pakfire: Automatically compose $version
The tree in which pakfire is looking for packages and Core Updates
has been hardcoded into /opt/pakfire/etc/pakfire.conf.

This patch adds a new function which reads the system release
from /etc/system-release.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-15 11:07:55 +00:00
Arne Fitzenreiter
c846ed1616 pakfire: use HTTPS if no protocol is specified
also use HTTPS on fallback to mainserver if no mirror was left

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-02 16:17:54 +00:00
Alexander Koch
8c072c5c43 Pakfire: Add Core-Version to "status"
Add the IPFire-Core-Version to the status message.

Signed-off-by: Alexander Koch <ipfire@starkstromkonsument.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-10 04:25:45 +01:00
Alexander Koch
090af02e07 Pakfire: Add new command line argument "status"
This enables Pakfire to return a Status-Summary for the Current Core-Update-Level, time since last updates, the availability of a core-/packet-update and if a reboot is required to complete an update. This can be used by monitoring agents (e.g. zabbix_agentd) to monitor the update status of the IPFire device.

Signed-off-by: Alexander Koch <ipfire@starkstromkonsument.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-07 23:51:20 +01:00
Arne Fitzenreiter
44b0afe029 core130: ship pakfire version update
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-04-07 17:13:43 +02:00
Michael Tremer
06d55142e5 pakfire: Remove any reference to counter.py
The concept has been retired a very log time ago
and the web service only responds with 200 what ever
it is being sent.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-08-27 07:29:19 +01:00
Michael Tremer
e32591e7bf pakfire: Remove mirror health check
This is not really necessary because pakfire will automatically
failover to the next mirror anyways and that a mirror responds
to an ICMP echo request doesn't necessarily mean that it can
deliver the requested file.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-08-27 07:23:03 +01:00
Michael Tremer
9a507db2cb pakfire: Store key material in own directory
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-04-03 17:31:50 +01:00
Michael Tremer
74e715a5a2 pakfire: Import old key, too
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-04-02 15:46:40 +01:00
Michael Tremer
397d3a8e15 pakfire: Rename new key to pakfire-2018.key
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-04-02 15:46:40 +01:00
Michael Tremer
3e29608f82 pakfire: Validate signatures when multiple are available
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-04-02 15:45:48 +01:00
Michael Tremer
4b072d640e pakfire: Use upstream proxy for HTTPS, too
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-03-28 16:55:18 +01:00
Peter Müller
66a0f3646a use protocol defined in server-list.db for mirror communication
For each mirror server, a protocol can be specified in the
server-list.db database. However, it was not used for the
actual URL query to a mirror before.

This might be useful for deploy HTTPS pinning for Pakfire.
If a mirror is known to support HTTPS, all queries to it
will be made with this protocol.

This saves some overhead if HTTPS is enforced on a mirror
via 301 redirects. To enable this, the server-list.db
needs to be adjusted.

The second version of this patch only handles protocols
HTTP and HTTPS, since we do not expect anything else here
at the moment.

Partially fixes #11661.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-03-28 16:42:21 +01:00
Michael Tremer
35b892b0dd pakfire: Drop old key import mechanism
This was error-prone and allowed to potentially inject another
key.

Fixes: #11539
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-03-16 14:37:21 +00:00
Michael Tremer
5e5c2e5413 Import new Pakfire Signing Key
We will swap the key that we use to sign Pakfire packages
since the current one is considered outdated cryptography.

Fixes: #11539

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-03-16 14:26:07 +00:00
Michael Tremer
396ff12342 pakfire: Properly check if we have our key with our fingerprint
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-12-12 19:40:01 +00:00
Michael Tremer
73b2988ae4 pakfire: Drop importing CACert's PGP key
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-12-12 19:28:16 +00:00
Matthias Fischer
db9f57143f pakfire - 'functions.pl': fixed typo
Just read this typo in a forum posting. Couldn't resist...

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-12-05 17:03:36 +00:00
Peter Müller
bb6481a820 validate GPG keys by fingerprint
Validate GPG keys by fingerprint and not by 8-bit key-ID.

This makes exploiting bug #11539 harder, but not impossible
and does not affect existing installations.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-11-13 22:41:21 +00:00
Michael Tremer
621dcd8609 pakfire: Fix dependency resolver
The old algorithm could potentially lock itself in an endless
recursion when there were packages with circular dependencies.

This version does not do this and is also faster.

Reported-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-04-07 12:04:02 +01:00
Jonatan Schlag
e6fd1f2d38 Fix in pakfire functions.sh
The if statement in line 89 and 99 are useless with the -e
conditional expression because it returns true if the path ist a
regular file or a directory.
So "/etc/init.d/ " returns true and "/etc/init.d/avahi" return also true,
but the statement should return only true if we have a regular file.
So -f if the right conditional expression, and we only try to execute
the init script if the path "/etc/init.d/${1}" points to a regular file.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-06-16 09:33:26 +01:00
Arne Fitzenreiter
33513817fa set version to IPFire 2.19 core100
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2016-03-20 09:36:33 +01:00
Arne Fitzenreiter
4e17785fc1 pakfire: remove wrong version of installed addons
in the installed addon list pakfire has showed
the latest version of the addon not the installed.

Fixes: #10875

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2015-11-11 14:54:21 +01:00
Michael Tremer
031becc0e2 pakfire: Resolve dependencies for upgraded packages
When updating more than one package, only new dependencies
for the first one are resolved. The rest was ignored.

This patch fixes that.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-07-09 21:01:10 +02:00
Michael Tremer
5555c4b887 pakfire: Fix installing dependencies when updating packages
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-07-09 20:53:33 +02:00
Lars Schuhmacher
b29a624081 pakfire: Add information about probable causes when pakfire cannot connect
Add information about probable causes when pakfire cannot connect. This
includes port 11371 TCP and incorrect date/time settings.

Signed-off-by: Lars Schuhmacher <larsen007@web.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-06-02 23:47:46 +02:00
Arne Fitzenreiter
1af34aa810 pakfire: skip corrupt "meta-" file.
This was created by a bug in dep resolve at upgrade.
2015-05-16 13:00:12 +02:00
Michael Tremer
9f1f68f17a pakfire: fix dep resolve at upgrade. 2015-05-16 12:57:28 +02:00
Michael Tremer
63efc01c84 pakfire: Prevent an infinite loop with empty server list. 2013-12-28 17:06:38 +01:00
Arne Fitzenreiter
2dd319f5b5 close core71. 2013-07-16 08:35:28 +02:00
Arne Fitzenreiter
fe3a05da3a pakfire: compression detection needs an extension. 2012-10-26 15:36:48 +02:00
Arne Fitzenreiter
03207e65b1 pakfire: enable compression autodetection inside the packages. 2012-10-26 09:56:31 +02:00
Arne Fitzenreiter
ace40c90ec pakfire: add function to extract backup includes.
this is needed to fix some addons with missing includes at the next
update. (eg. nagios).
2012-07-07 19:37:56 +02:00
Michael Tremer
7b321c2cbe Merge remote branch 'origin/next' into arm-port
Conflicts:
	config/rootfiles/common/i586/gcc
	lfs/binutils
	lfs/cleanup-toolchain
	lfs/coreutils
	lfs/gcc
	lfs/glibc
	lfs/groff
	src/pakfire/pakfire.conf
	src/patches/gcc-4.1.2-specs-1.patch
2011-09-18 02:58:34 +02:00
Michael Tremer
1e40ba2a0d pakfire: Automatically write version number to pakfire.conf. 2011-09-17 14:55:33 +02:00
Arne Fitzenreiter
b0dcbdeae4 core53: next is core53 now.
set version in backupiso and pakfire to 2.11.
2011-09-11 16:06:52 +02:00
Arne Fitzenreiter
ccbe39e94a Change pgp keyserver to pgp.ipfire.org so we can change it in the dns. 2011-02-07 19:56:39 +01:00
Arne Fitzenreiter
8cd7fc6b02 Set 2.9 as pakfire tree. 2010-12-06 00:28:05 +01:00