public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/
Date: Fri, 11 Nov 2016 17:08:58 +0000 (UTC)	[thread overview]
Message-ID: <1478884098.db7f0584b1c3b0679391f60680ab83839c1943d1.williamh@gentoo> (raw)

commit:     db7f0584b1c3b0679391f60680ab83839c1943d1
Author:     Roy Marples <roy <AT> marples <DOT> name>
AuthorDate: Fri Nov 11 17:03:00 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Nov 11 17:08:18 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db7f0584

net-misc/dhcpcd: copy files to new locations for dhcpcd-7 for #599396

Note from WilliamH:
The original patch was modified to use "${EROOT%/}"/ instead of "${ROOT}"/.

Package-Manager: portage-2.3.0

 net-misc/dhcpcd/dhcpcd-9999.ebuild | 74 +++++++++++++++++++++++++++++++++-----
 1 file changed, 65 insertions(+), 9 deletions(-)

diff --git a/net-misc/dhcpcd/dhcpcd-9999.ebuild b/net-misc/dhcpcd/dhcpcd-9999.ebuild
index 0b616f0..f6264d2 100644
--- a/net-misc/dhcpcd/dhcpcd-9999.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9999.ebuild
@@ -79,21 +79,77 @@ src_install()
 
 pkg_postinst()
 {
-	# Upgrade the duid file to the new format if needed
-	local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
-	local new_duid="${ROOT}"/etc/dhcpcd.duid
-	if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
-		sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
+	local dbdir="${EROOT%/}"/var/lib/dhcpcd old_files=
+
+	local old_old_duid="${EROOT%/}"/var/lib/dhcpcd/dhcpcd.duid
+	local old_duid="${EROOT%/}"/etc/dhcpcd.duid
+	local new_duid="${dbdir}"/duid
+	if [ -e "${old_old_duid}" ]; then
+		# Upgrade the duid file to the new format if needed
+		if ! grep -q '..:..:..:..:..:..' "${old_old_duid}"; then
+			sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_old_duid}"
+		fi
+
+		# Move the duid to /etc, a more sensible location
+		if [ ! -e "${old_duid}" ]; then
+			cp -p "${old_old_duid}" "${new_duid}"
+		fi
+		old_files="${old_files} ${old_old_duid}"
+	fi
+
+	# dhcpcd-7 moves the files out of /etc
+	if [ -e "${old_duid}" ]; then
+		if [ ! -e "${new_duid}" ]; then
+			cp -p "${old_duid}" "${new_duid}"
+		fi
+		old_files="${old_files} ${old_duid}"
+	fi
+	local old_secret="${EROOT%/}"/etc/dhcpcd.secret
+	local new_secret="${dbdir}"/secret
+	if [ -e "${old_secret}" ]; then
+		if [ ! -e "${new_secret}" ]; then
+			cp -p "${old_secret}" "${new_secret}"
+		fi
+		old_files="${old_files} ${old_secret}"
 	fi
 
-	# Move the duid to /etc, a more sensible location
-	if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
-		cp -p "${old_duid}" "${new_duid}"
+	# dhcpcd-7 renames some files in /var/lib/dhcpcd
+	local old_rdm="${dbdir}"/dhcpcd-rdm.monotonic
+	local new_rdm="${dbdir}"/rdm_monotonic
+	if [ -e "${old_rdm}" ]; then
+		if [ ! -e "${new_rdm}" ]; then
+			cp -p "${old_rdm}" "${new_rdm}"
+		fi
+		old_files="${old_files} ${old_rdm}"
+	fi
+	local lease=
+	for lease in "${dbdir}"/dhcpcd-*.lease*; do
+		[ -f "$lease" ] || continue
+		old_files="${old_files} ${lease}"
+		local new_lease=$(basename "$lease" | sed -e "s/dhcpcd-//")
+		[ -e "${dbdir}/${new_lease}" ] && continue
+		cp "${lease}" "${dbdir}/${new_lease}"
+	done
+
+	# Warn about removing stale files
+	if [ -n "${old_files}" ]; then
+		elog
+		elog "dhcpcd-7 has copied dhcpcd.duid and dhcpcd.secret from"
+		elog "${EROOT%/}/etc to ${dbdir}"
+		elog "and copied leases in ${dbdir} to new files with the dhcpcd-"
+		elog "prefix dropped."
+		elog
+		elog "You should remove these files if you don't plan on reverting"
+		elog "to an older version:"
+		local old_file=
+		for old_file in ${old_files}; do
+			elog "	${old_file}"
+		done
 	fi
 
 	if [ -z "$REPLACING_VERSIONS" ]; then
 		elog
-	 elog "dhcpcd has zeroconf support active by default."
+		elog "dhcpcd has zeroconf support active by default."
 		elog "This means it will always obtain an IP address even if no"
 		elog "DHCP server can be contacted, which will break any existing"
 		elog "failover support you may have configured in your net configuration."


             reply	other threads:[~2016-11-11 17:09 UTC|newest]

Thread overview: 319+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 17:08 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-27 20:30 [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/ Sam James
2024-11-13 11:10 Arthur Zamarin
2024-11-11 14:47 Sam James
2024-11-03 16:36 Andreas K. Hüttel
2024-10-31  0:23 Sam James
2024-10-13 21:41 Sam James
2024-10-09  6:59 Arthur Zamarin
2024-10-09  0:06 Jakov Smolić
2024-10-05 14:30 Arthur Zamarin
2024-10-05 13:58 Arthur Zamarin
2024-10-05 12:03 Arthur Zamarin
2024-10-05 11:48 Arthur Zamarin
2024-10-05  5:35 Sam James
2024-09-01  7:10 Sam James
2024-06-25  6:43 Sam James
2024-06-25  6:43 Sam James
2024-06-25  6:43 Sam James
2024-06-25  4:45 Sam James
2024-06-25  4:41 Sam James
2024-06-25  4:10 Sam James
2024-06-25  4:07 Sam James
2024-05-25  2:13 Sam James
2024-05-22  1:06 Sam James
2024-04-17  5:37 Arthur Zamarin
2024-03-24 12:12 Sam James
2024-03-24 11:35 Sam James
2024-03-24 11:35 Sam James
2024-03-24 11:35 Sam James
2024-03-24 11:29 Sam James
2024-03-24 11:29 Sam James
2024-03-24 11:29 Sam James
2024-02-07  1:19 Sam James
2024-02-03  6:56 Sam James
2024-02-02 16:27 Arthur Zamarin
2024-02-02 14:46 Arthur Zamarin
2024-02-02  5:29 Sam James
2023-12-28  4:04 Sam James
2023-12-20 15:19 Sam James
2023-12-03 16:34 Arthur Zamarin
2023-12-03 16:34 Arthur Zamarin
2023-12-03 16:34 Arthur Zamarin
2023-12-03 16:34 Arthur Zamarin
2023-12-03 10:49 Arthur Zamarin
2023-12-03 10:49 Arthur Zamarin
2023-12-03 10:49 Arthur Zamarin
2023-12-03 10:49 Arthur Zamarin
2023-11-12  4:24 Sam James
2023-10-20  0:51 Sam James
2023-10-20  0:51 Sam James
2023-10-09  0:50 Sam James
2023-10-09  0:34 Sam James
2023-10-09  0:34 Sam James
2023-10-09  0:34 Sam James
2023-10-09  0:34 Sam James
2023-10-09  0:23 Sam James
2023-10-09  0:23 Sam James
2023-10-06 21:37 Sam James
2023-08-23 16:21 William Hubbs
2023-08-20  5:43 Sam James
2023-08-19 11:38 Sam James
2023-08-19  9:24 Sam James
2023-08-19  9:24 Sam James
2023-08-19  6:58 Arthur Zamarin
2023-08-19  6:23 Sam James
2023-08-19  6:23 Sam James
2023-07-20  2:26 Sam James
2023-06-03 19:45 Arthur Zamarin
2023-06-03 17:25 Sam James
2023-06-03 17:25 Sam James
2023-06-03  6:29 Sam James
2023-06-03  6:29 Sam James
2023-06-03  6:29 Sam James
2023-06-03  6:29 Sam James
2023-06-03  6:29 Sam James
2023-06-03  5:15 Sam James
2023-06-03  5:15 Sam James
2023-04-21  8:07 Sam James
2023-04-16  7:42 Sam James
2023-04-16  7:39 Sam James
2023-04-13  4:03 Sam James
2022-05-26  5:06 WANG Xuerui
2022-05-03 18:48 Arthur Zamarin
2022-05-03 18:16 Arthur Zamarin
2022-05-03 17:47 Arthur Zamarin
2022-04-29 19:21 Sam James
2022-04-29 19:21 Sam James
2022-04-29  9:09 Sam James
2022-04-29  8:29 Jakov Smolić
2022-04-29  8:29 Jakov Smolić
2022-01-04 10:30 David Seifert
2022-01-03 23:26 David Seifert
2021-12-20 23:26 William Hubbs
2021-10-24 20:09 Lars Wendler
2021-10-24 20:05 Lars Wendler
2021-10-24 20:05 Lars Wendler
2021-10-24  9:29 Sam James
2021-05-14 20:34 Sergei Trofimovich
2021-05-14  9:35 Agostino Sarubbo
2021-05-13 17:53 Sam James
2021-05-13 16:24 Sam James
2021-05-13 16:24 Sam James
2021-05-13 16:18 Sam James
2021-05-13 16:15 Sam James
2021-04-12 22:12 Sam James
2021-04-12 22:12 Sam James
2021-04-02 10:35 Agostino Sarubbo
2021-03-18 18:58 Sergei Trofimovich
2021-03-16 19:57 Sam James
2021-03-16 18:10 Sergei Trofimovich
2021-03-12 15:28 Sam James
2021-03-12  8:04 Mikle Kolyada
2021-03-11  2:35 Sam James
2021-01-25  8:33 Lars Wendler
2021-01-25  0:43 Sam James
2021-01-24 23:39 Sam James
2021-01-24 13:33 Sam James
2021-01-22 18:45 Sam James
2021-01-21 22:31 Sam James
2021-01-20 23:05 Sam James
2021-01-20 20:53 Sam James
2021-01-20 15:29 Lars Wendler
2020-12-28 19:44 Lars Wendler
2020-12-28 19:44 Lars Wendler
2020-11-28 20:36 Lars Wendler
2020-11-28 20:36 Lars Wendler
2020-11-20 14:04 Lars Wendler
2020-11-20 14:04 Lars Wendler
2020-11-01 19:23 Lars Wendler
2020-11-01 19:23 Lars Wendler
2020-10-12 16:06 Lars Wendler
2020-10-05 20:16 Lars Wendler
2020-10-05 20:16 Lars Wendler
2020-09-07  8:09 Lars Wendler
2020-09-07  8:09 Lars Wendler
2020-07-03 11:08 Lars Wendler
2020-07-03 11:08 Lars Wendler
2020-07-02 14:48 Lars Wendler
2020-06-04 18:30 Lars Wendler
2020-06-04 18:30 Lars Wendler
2020-04-26  8:58 Sergei Trofimovich
2020-04-23 10:41 Agostino Sarubbo
2020-04-23 10:41 Agostino Sarubbo
2020-04-23 10:40 Agostino Sarubbo
2020-04-23 10:39 Agostino Sarubbo
2020-04-23 10:37 Agostino Sarubbo
2020-04-23 10:09 Agostino Sarubbo
2020-04-23  8:59 Agostino Sarubbo
2020-04-21 11:27 Lars Wendler
2020-04-21 11:27 Lars Wendler
2020-04-21 10:33 Lars Wendler
2020-04-13 17:01 Lars Wendler
2020-04-02 19:40 Lars Wendler
2020-04-02 19:40 Lars Wendler
2020-04-02 19:40 Lars Wendler
2020-04-02 19:40 Lars Wendler
2020-02-01  8:49 Lars Wendler
2020-01-03 17:35 Lars Wendler
2020-01-03 10:30 Lars Wendler
2020-01-03 10:30 Lars Wendler
2019-12-21  8:52 Lars Wendler
2019-11-13 11:12 Lars Wendler
2019-11-13 11:12 Lars Wendler
2019-11-05 16:25 Lars Wendler
2019-11-05 16:20 Lars Wendler
2019-10-16 15:11 Lars Wendler
2019-10-13 18:43 Lars Wendler
2019-09-14 10:07 Lars Wendler
2019-09-14 10:07 Lars Wendler
2019-09-04 15:28 Lars Wendler
2019-08-21 21:53 Lars Wendler
2019-07-30 11:06 Lars Wendler
2019-07-28 20:35 William Hubbs
2019-07-28 20:29 William Hubbs
2019-07-28 12:08 Lars Wendler
2019-07-26 21:32 Sergei Trofimovich
2019-07-26 17:55 Sergei Trofimovich
2019-07-26  8:41 Lars Wendler
2019-07-26  8:00 Agostino Sarubbo
2019-07-25 23:30 Aaron Bauman
2019-07-25 18:31 Sergei Trofimovich
2019-07-25 13:40 Mikle Kolyada
2019-07-25 13:40 Mikle Kolyada
2019-07-25 13:40 Mikle Kolyada
2019-07-25 13:40 Mikle Kolyada
2019-07-25 13:40 Mikle Kolyada
2019-07-25 13:40 Mikle Kolyada
2019-07-25 13:40 Mikle Kolyada
2019-07-25 13:40 Mikle Kolyada
2019-07-25  6:46 Lars Wendler
2019-07-25  6:46 Lars Wendler
2019-07-05 21:16 Andreas K. Hüttel
2019-06-27  8:02 Lars Wendler
2019-06-27  8:02 Lars Wendler
2019-06-27  8:02 Lars Wendler
2019-05-25  8:22 Mikle Kolyada
2019-05-25  8:20 Mikle Kolyada
2019-05-25  8:20 Mikle Kolyada
2019-05-24 20:10 Sergei Trofimovich
2019-05-12 22:03 Sergei Trofimovich
2019-05-12 21:57 Sergei Trofimovich
2019-05-12 21:48 Sergei Trofimovich
2019-05-12 19:29 Thomas Deutschmann
2019-05-11 12:18 Mikle Kolyada
2019-05-10  2:28 Aaron Bauman
2019-05-08 19:55 Sergei Trofimovich
2019-05-08 19:29 Agostino Sarubbo
2019-05-08 14:38 Tobias Klausmann
2019-05-05 21:56 William Hubbs
2019-05-03 13:14 Mikle Kolyada
2019-05-03 13:14 Mikle Kolyada
2019-05-03 13:14 Mikle Kolyada
2019-05-03 13:14 Mikle Kolyada
2019-05-02  6:41 Matt Turner
2019-04-28 20:34 Thomas Deutschmann
2019-04-28 20:28 Mikle Kolyada
2019-04-28 13:03 Sergei Trofimovich
2019-04-28  7:42 Sergei Trofimovich
2019-04-27 15:48 Sergei Trofimovich
2019-04-27 15:20 Sergei Trofimovich
2019-04-26 20:34 Mikle Kolyada
2019-04-26 19:47 Aaron Bauman
2019-04-26 15:07 Lars Wendler
2019-04-20 17:57 Mikle Kolyada
2019-04-20  8:21 Lars Wendler
2019-04-20  8:21 Lars Wendler
2019-04-12  2:34 Aaron Bauman
2019-04-07 22:02 Mikle Kolyada
2019-04-07 22:02 Mikle Kolyada
2019-04-07 22:02 Mikle Kolyada
2019-04-07 21:34 Sergei Trofimovich
2019-04-07 21:16 Sergei Trofimovich
2019-04-07 21:01 Sergei Trofimovich
2019-04-07 20:52 Sergei Trofimovich
2019-04-05 19:03 Sergei Trofimovich
2019-04-02 17:51 Mikle Kolyada
2019-02-08  8:10 Lars Wendler
2019-02-08  8:10 Lars Wendler
2019-01-25 17:18 Mikle Kolyada
2019-01-25 17:16 Mikle Kolyada
2018-08-22  2:20 Mikle Kolyada
2018-07-24 17:38 William Hubbs
2018-07-24 17:04 William Hubbs
2018-06-26 11:21 Thomas Deutschmann
2018-06-10 21:23 Thomas Deutschmann
2018-06-07 17:53 William Hubbs
2018-06-07  0:44 Thomas Deutschmann
2018-06-07  0:44 Thomas Deutschmann
2018-05-05 18:51 William Hubbs
2018-05-05 18:47 William Hubbs
2018-05-02 17:11 Mart Raudsepp
2018-05-01 20:07 Mikle Kolyada
2018-04-15 16:47 Mikle Kolyada
2018-04-07  5:17 Matt Turner
2018-04-07  5:17 Matt Turner
2018-04-06 15:26 William Hubbs
2018-04-03 21:47 Sergei Trofimovich
2018-04-01 10:00 Tobias Klausmann
2018-03-31 10:30 Sergei Trofimovich
2018-03-29 14:20 William Hubbs
2018-03-21 19:43 Sergei Trofimovich
2018-03-20 10:01 Agostino Sarubbo
2018-03-19 23:33 Sergei Trofimovich
2018-03-15 14:08 Mikle Kolyada
2018-03-05 10:36 Tobias Klausmann
2018-02-14 13:29 Jason Zaman
2018-02-07  6:04 Thomas Deutschmann
2018-02-06 23:25 Sergei Trofimovich
2018-02-06 23:12 Sergei Trofimovich
2018-02-06 18:12 William Hubbs
2018-02-06 17:49 William Hubbs
2018-02-06 17:44 William Hubbs
2018-01-03 15:00 William Hubbs
2017-12-08  0:01 William Hubbs
2017-10-07 17:50 William Hubbs
2017-09-20 14:29 William Hubbs
2017-09-20 14:29 William Hubbs
2017-05-10 19:21 William Hubbs
2017-04-20 16:07 William Hubbs
2017-04-03 14:40 William Hubbs
2017-04-01 19:56 William Hubbs
2017-02-24 21:50 William Hubbs
2017-02-24  7:09 Mike Frysinger
2016-12-21 11:49 Thomas Deutschmann
2016-10-09 15:18 William Hubbs
2016-10-05 18:57 Markus Meier
2016-10-01 13:00 Jeroen Roovers
2016-09-21 17:48 Tobias Klausmann
2016-09-15 17:55 William Hubbs
2016-09-04 10:21 Tobias Klausmann
2016-08-16  3:13 William Hubbs
2016-08-14 19:22 Markus Meier
2016-08-04  8:45 Jeroen Roovers
2016-07-29 13:30 William Hubbs
2016-07-21 21:15 William Hubbs
2016-07-05 21:26 Sergei Trofimovich
2016-07-05 21:26 Sergei Trofimovich
2016-07-05 21:16 Sergei Trofimovich
2016-07-05 21:10 Sergei Trofimovich
2016-06-18 16:49 William Hubbs
2016-05-21 21:02 Matt Turner
2016-05-09 16:57 William Hubbs
2016-05-07  5:01 William Hubbs
2016-04-12 15:55 William Hubbs
2016-03-15 17:31 Markus Meier
2016-02-27 12:38 Jeroen Roovers
2016-02-20 19:37 William Hubbs
2016-01-29 14:51 William Hubbs
2016-01-28 19:47 Mike Frysinger
2016-01-21  3:51 William Hubbs
2016-01-17 16:04 Tobias Klausmann
2016-01-15 13:42 Andreas Schuerch
2016-01-12  6:47 Jeroen Roovers
2016-01-12  6:47 Jeroen Roovers
2016-01-10 18:32 Richard Farina
2016-01-08 18:37 Mikle Kolyada
2016-01-07 20:42 William Hubbs
2015-09-04 19:35 William Hubbs
2015-08-25 16:03 William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478884098.db7f0584b1c3b0679391f60680ab83839c1943d1.williamh@gentoo \
    --to=williamh@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox