From fb49e5fdd62e4aec03bbf24a677e7bb6dcddc5ca Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 28 Apr 2017 22:56:18 +0200 Subject: drop unit file paccache.service --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 264043b..16e8280 100644 --- a/Makefile +++ b/Makefile @@ -57,10 +57,9 @@ install-bin: pacredir $(INSTALL) -D -m0644 pacman/paccache $(DESTDIR)/etc/pacman.d/paccache $(INSTALL) -D -m0644 avahi/pacserve.service $(DESTDIR)/etc/avahi/services/pacserve.service $(INSTALL) -D -m0644 avahi/pacdbserve.service $(DESTDIR)/etc/avahi/services/pacdbserve.service - $(INSTALL) -D -m0644 systemd/paccache.service $(DESTDIR)$(PREFIX)/lib/systemd/system/paccache.service - $(INSTALL) -D -m0644 systemd/pacserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacserve.service $(INSTALL) -D -m0644 systemd/pacdbserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacdbserve.service $(INSTALL) -D -m0644 systemd/pacredir.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacredir.service + $(INSTALL) -D -m0644 systemd/pacserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacserve.service $(INSTALL) -D -m0644 initcpio/hooks/paccache $(DESTDIR)$(PREFIX)/lib/initcpio/hooks/paccache $(INSTALL) -D -m0644 initcpio/install/paccache $(DESTDIR)$(PREFIX)/lib/initcpio/install/paccache $(INSTALL) -D -m0644 dhcpcd/80-pacredir $(DESTDIR)$(PREFIX)/lib/dhcpcd/dhcpcd-hooks/80-pacredir -- cgit v1.2.3-70-g09d2 From 3f39d0e11b54d025d47eea298a08fc744d1b8974 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 28 Apr 2017 23:12:29 +0200 Subject: rename files to 'pacredir' --- Makefile | 6 +++--- README.md | 2 +- initcpio/hooks/paccache | 29 ----------------------------- initcpio/hooks/pacredir | 29 +++++++++++++++++++++++++++++ initcpio/install/paccache | 9 --------- initcpio/install/pacredir | 11 +++++++++++ pacman/paccache | 2 -- pacman/pacredir | 2 ++ 8 files changed, 46 insertions(+), 44 deletions(-) delete mode 100644 initcpio/hooks/paccache create mode 100644 initcpio/hooks/pacredir delete mode 100644 initcpio/install/paccache create mode 100644 initcpio/install/pacredir delete mode 100644 pacman/paccache create mode 100644 pacman/pacredir (limited to 'Makefile') diff --git a/Makefile b/Makefile index 16e8280..7d3a416 100644 --- a/Makefile +++ b/Makefile @@ -54,14 +54,14 @@ install-bin: pacredir $(LN) -s darkhttpd $(DESTDIR)$(PREFIX)/bin/pacserve $(LN) -s darkhttpd $(DESTDIR)$(PREFIX)/bin/pacdbserve $(INSTALL) -D -m0644 pacredir.conf $(DESTDIR)/etc/pacredir.conf - $(INSTALL) -D -m0644 pacman/paccache $(DESTDIR)/etc/pacman.d/paccache + $(INSTALL) -D -m0644 pacman/pacredir $(DESTDIR)/etc/pacman.d/pacredir $(INSTALL) -D -m0644 avahi/pacserve.service $(DESTDIR)/etc/avahi/services/pacserve.service $(INSTALL) -D -m0644 avahi/pacdbserve.service $(DESTDIR)/etc/avahi/services/pacdbserve.service $(INSTALL) -D -m0644 systemd/pacdbserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacdbserve.service $(INSTALL) -D -m0644 systemd/pacredir.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacredir.service $(INSTALL) -D -m0644 systemd/pacserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacserve.service - $(INSTALL) -D -m0644 initcpio/hooks/paccache $(DESTDIR)$(PREFIX)/lib/initcpio/hooks/paccache - $(INSTALL) -D -m0644 initcpio/install/paccache $(DESTDIR)$(PREFIX)/lib/initcpio/install/paccache + $(INSTALL) -D -m0644 initcpio/hooks/pacredir $(DESTDIR)$(PREFIX)/lib/initcpio/hooks/pacredir + $(INSTALL) -D -m0644 initcpio/install/pacredir $(DESTDIR)$(PREFIX)/lib/initcpio/install/pacredir $(INSTALL) -D -m0644 dhcpcd/80-pacredir $(DESTDIR)$(PREFIX)/lib/dhcpcd/dhcpcd-hooks/80-pacredir $(INSTALL) -D -m0755 networkmanager/80-pacredir $(DESTDIR)/etc/NetworkManager/dispatcher.d/80-pacredir diff --git a/README.md b/README.md index 6bd7482..2b4f0a7 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ works. Then enable systemd services `pacserve`, `pacdbserve` and `pacredir`, open TCP ports 7078 and 7079 and add the following line to your repository definitions in `pacman.conf`: -> Include = /etc/pacman.d/paccache +> Include = /etc/pacman.d/pacredir Do not worry if `pacman` reports: diff --git a/initcpio/hooks/paccache b/initcpio/hooks/paccache deleted file mode 100644 index 5f8d560..0000000 --- a/initcpio/hooks/paccache +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -run_latehook() { - local newroot="/new_root/" - - if ! grep -q '^pacserve hosts' ${newroot}/etc/pacredir.conf; then - if [[ -n "${pacserve}" ]]; then - msg ":: Adding pacserve host '${pacserve}' to pacredir.conf..." - echo "pacserve hosts = ${pacserve}" >> ${newroot}/etc/pacredir.conf - fi - fi - - if ! grep -q '^pacdbserve hosts' ${newroot}/etc/pacredir.conf; then - case $(uname -m) in - x86_64) - if [[ -n "${pacdbserve_x86_64}" ]]; then - msg ":: Adding pacdbserve host '${pacdbserve_x86_64}' to pacredir.conf..." - echo "pacdbserve hosts = ${pacdbserve_x86_64}" >> ${newroot}/etc/pacredir.conf - fi - ;; - i686) - if [[ -n "${pacdbserve_i686}" ]]; then - msg ":: Adding pacdbserve host '${pacdbserve_i686}' to pacredir.conf..." - echo "pacdbserve hosts = ${pacdbserve_i686}" >> ${newroot}/etc/pacredir.conf - fi - ;; - esac - fi -} diff --git a/initcpio/hooks/pacredir b/initcpio/hooks/pacredir new file mode 100644 index 0000000..5f8d560 --- /dev/null +++ b/initcpio/hooks/pacredir @@ -0,0 +1,29 @@ +#!/bin/sh + +run_latehook() { + local newroot="/new_root/" + + if ! grep -q '^pacserve hosts' ${newroot}/etc/pacredir.conf; then + if [[ -n "${pacserve}" ]]; then + msg ":: Adding pacserve host '${pacserve}' to pacredir.conf..." + echo "pacserve hosts = ${pacserve}" >> ${newroot}/etc/pacredir.conf + fi + fi + + if ! grep -q '^pacdbserve hosts' ${newroot}/etc/pacredir.conf; then + case $(uname -m) in + x86_64) + if [[ -n "${pacdbserve_x86_64}" ]]; then + msg ":: Adding pacdbserve host '${pacdbserve_x86_64}' to pacredir.conf..." + echo "pacdbserve hosts = ${pacdbserve_x86_64}" >> ${newroot}/etc/pacredir.conf + fi + ;; + i686) + if [[ -n "${pacdbserve_i686}" ]]; then + msg ":: Adding pacdbserve host '${pacdbserve_i686}' to pacredir.conf..." + echo "pacdbserve hosts = ${pacdbserve_i686}" >> ${newroot}/etc/pacredir.conf + fi + ;; + esac + fi +} diff --git a/initcpio/install/paccache b/initcpio/install/paccache deleted file mode 100644 index 1cb06a4..0000000 --- a/initcpio/install/paccache +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -build() { - add_runscript -} - -help() { - echo "This hook adds Server to pacredir.conf from inside initramfs." -} diff --git a/initcpio/install/pacredir b/initcpio/install/pacredir new file mode 100644 index 0000000..f9663af --- /dev/null +++ b/initcpio/install/pacredir @@ -0,0 +1,11 @@ +#!/bin/sh + +build() { + add_runscript +} + +help() { + echo 'This hook adds servers to pacredir.conf from inside initramfs.' + echo 'Useless for installed systems, but can be handy with' + echo 'no-persistent configurations.' +} diff --git a/pacman/paccache b/pacman/paccache deleted file mode 100644 index a1de680..0000000 --- a/pacman/paccache +++ /dev/null @@ -1,2 +0,0 @@ -# Make sure local service pacredir is running! -Server = http://localhost:7077/ diff --git a/pacman/pacredir b/pacman/pacredir new file mode 100644 index 0000000..a1de680 --- /dev/null +++ b/pacman/pacredir @@ -0,0 +1,2 @@ +# Make sure local service pacredir is running! +Server = http://localhost:7077/ -- cgit v1.2.3-70-g09d2 From e73f944a7151e89c514e324657e9480f1008b1c9 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 28 Apr 2017 23:25:31 +0200 Subject: update references to 'pacredir' --- .gitignore | 4 ++-- Makefile | 10 +++++----- README.md | 14 +++++++------- config.def.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'Makefile') diff --git a/.gitignore b/.gitignore index 592c2d3..ff8db53 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,5 @@ config.h avahi/pacdbserve.service README.html version.h -paccache-*.tar.xz -paccache-*.tar.xz.asc +pacredir-*.tar.xz +pacredir-*.tar.xz.asc diff --git a/Makefile b/Makefile index 7d3a416..2db7ee6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# paccache - serve pacman cache and redirect via avahi service +# pacredir - redirect pacman requests, assisted by avahi service discovery PREFIX := /usr @@ -66,8 +66,8 @@ install-bin: pacredir $(INSTALL) -D -m0755 networkmanager/80-pacredir $(DESTDIR)/etc/NetworkManager/dispatcher.d/80-pacredir install-doc: README.html - $(INSTALL) -D -m0644 README.md $(DESTDIR)$(PREFIX)/share/doc/paccache/README.md - $(INSTALL) -D -m0644 README.html $(DESTDIR)$(PREFIX)/share/doc/paccache/README.html + $(INSTALL) -D -m0644 README.md $(DESTDIR)$(PREFIX)/share/doc/pacredir/README.md + $(INSTALL) -D -m0644 README.html $(DESTDIR)$(PREFIX)/share/doc/pacredir/README.html clean: $(RM) -f *.o *~ arch pacredir avahi/pacdbserve.service README.html version.h @@ -76,5 +76,5 @@ distclean: $(RM) -f *.o *~ arch pacredir avahi/pacdbserve.service README.html version.h config.h release: - git archive --format=tar.xz --prefix=paccache-$(VERSION)/ $(VERSION) > paccache-$(VERSION).tar.xz - gpg -ab paccache-$(VERSION).tar.xz + git archive --format=tar.xz --prefix=pacredir-$(VERSION)/ $(VERSION) > pacredir-$(VERSION).tar.xz + gpg -ab pacredir-$(VERSION).tar.xz diff --git a/README.md b/README.md index 2b4f0a7..a888445 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -paccache +pacredir ======== -**paccache - serve pacman cache and redirect via avahi service** +**pacredir - redirect pacman requests, assisted by avahi service discovery** By default every [Arch Linux](https://www.archlinux.org/) installation downloads its package files from online mirrors, transferring all the @@ -9,13 +9,13 @@ bits via WAN connection. But often other Arch systems may be around that already have the files available on local storage - just a fast LAN connection way. This is -where `paccache` can help. It uses [Avahi](http://avahi.org/) to find +where `pacredir` can help. It uses [Avahi](http://avahi.org/) to find other instances and get the files there if available. Requirements ------------ -To compile and run `paccache` you need: +To compile and run `pacredir` you need: * [systemd](https://www.github.com/systemd/systemd) * [avahi](http://avahi.org/) @@ -41,7 +41,7 @@ followed by: > make install This will place an executable at `/usr/bin/pacredir`, -documentation can be found in `/usr/share/doc/paccache/`. +documentation can be found in `/usr/share/doc/pacredir/`. Additionally systemd service files are installed to `/usr/lib/systemd/system/` and avahi service files go to `/etc/avahi/services/`. @@ -80,5 +80,5 @@ anything goes wrong. ### Upstream -URL: [GitHub.com](https://github.com/eworm-de/paccache) -Mirror: [eworm.de](https://git.eworm.de/cgit.cgi/paccache/) +URL: [GitHub.com](https://github.com/eworm-de/pacredir) +Mirror: [eworm.de](https://git.eworm.de/cgit.cgi/pacredir/) diff --git a/config.def.h b/config.def.h index 8dfa874..037bd4a 100644 --- a/config.def.h +++ b/config.def.h @@ -9,7 +9,7 @@ #define _CONFIG_H /* website url */ -#define WEBSITE "https://github.com/eworm-de/paccache/" +#define WEBSITE "https://github.com/eworm-de/pacredir/" /* This is used for default documents. Usually you will not see this anyway. */ #define PAGE307 "307 temporary redirect" \ -- cgit v1.2.3-70-g09d2