linux-cxl.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ndctl PATCH 0/2] misc RPM / release scripts fixes
@ 2022-08-29 23:41 Vishal Verma
  2022-08-29 23:41 ` [ndctl PATCH 1/2] ndctl.spec.in: Address misc. packaging bugs (RHBZ#2100157) Vishal Verma
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vishal Verma @ 2022-08-29 23:41 UTC (permalink / raw)
  To: nvdimm; +Cc: Dan Williams, corsepiu, linux-cxl, Vishal Verma

Add a couple of fixes to the RPM spec to correctly claim ownership of
config directories, and updates to release scripts for meson.

Vishal Verma (2):
  ndctl.spec.in: Address misc. packaging bugs (RHBZ#2100157)
  scripts: update release scripts for meson

 ndctl.spec.in              |  8 +++++++-
 scripts/do_abidiff         | 14 ++++++--------
 scripts/prepare-release.sh | 24 ++++++++++++------------
 3 files changed, 25 insertions(+), 21 deletions(-)


base-commit: c9c9db39354ea0c3f737378186318e9b7908e3a7
-- 
2.37.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ndctl PATCH 1/2] ndctl.spec.in: Address misc. packaging bugs (RHBZ#2100157)
  2022-08-29 23:41 [ndctl PATCH 0/2] misc RPM / release scripts fixes Vishal Verma
@ 2022-08-29 23:41 ` Vishal Verma
  2022-08-29 23:41 ` [ndctl PATCH 2/2] scripts: update release scripts for meson Vishal Verma
  2022-09-22 16:23 ` [ndctl PATCH 0/2] misc RPM / release scripts fixes Dan Williams
  2 siblings, 0 replies; 4+ messages in thread
From: Vishal Verma @ 2022-08-29 23:41 UTC (permalink / raw)
  To: nvdimm; +Cc: Dan Williams, corsepiu, linux-cxl, Vishal Verma

Address some RPM packing bugs where the spec failed to claim parent
directories that it creates for config files.

Based on a patch by Ralf Corsépius <corsepiu@fedoraproject.org>

Link: https://src.fedoraproject.org/rpms/ndctl/c/401f506f1288384127e1ca20c64df64a9cd413f2?branch=rawhide
Cc: Ralf Corsépius <corsepiu@fedoraproject.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 ndctl.spec.in | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ndctl.spec.in b/ndctl.spec.in
index cfcafa2..4788dab 100644
--- a/ndctl.spec.in
+++ b/ndctl.spec.in
@@ -171,9 +171,14 @@ fi
 %{_mandir}/man1/ndctl*
 %{bashcompdir}/ndctl
 %{_unitdir}/ndctl-monitor.service
+
+%dir %{_sysconfdir}/ndctl
+%dir %{_sysconfdir}/ndctl/keys
 %{_sysconfdir}/ndctl/keys/keys.readme
+
 %{_sysconfdir}/modprobe.d/nvdimm-security.conf
 
+%dir %{_sysconfdir}/ndctl.conf.d
 %config(noreplace) %{_sysconfdir}/ndctl.conf.d/monitor.conf
 %config(noreplace) %{_sysconfdir}/ndctl.conf.d/ndctl.conf
 
@@ -182,10 +187,11 @@ fi
 %license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
 %{_bindir}/daxctl
 %{_mandir}/man1/daxctl*
-%{_datadir}/daxctl/daxctl.conf
+%{_datadir}/daxctl
 %{bashcompdir}/daxctl
 %{_unitdir}/daxdev-reconfigure@.service
 %config %{_udevrulesdir}/90-daxctl-device.rules
+%dir %{_sysconfdir}/daxctl.conf.d/
 %config(noreplace) %{_sysconfdir}/daxctl.conf.d/daxctl.example.conf
 
 %files -n cxl-cli
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [ndctl PATCH 2/2] scripts: update release scripts for meson
  2022-08-29 23:41 [ndctl PATCH 0/2] misc RPM / release scripts fixes Vishal Verma
  2022-08-29 23:41 ` [ndctl PATCH 1/2] ndctl.spec.in: Address misc. packaging bugs (RHBZ#2100157) Vishal Verma
@ 2022-08-29 23:41 ` Vishal Verma
  2022-09-22 16:23 ` [ndctl PATCH 0/2] misc RPM / release scripts fixes Dan Williams
  2 siblings, 0 replies; 4+ messages in thread
From: Vishal Verma @ 2022-08-29 23:41 UTC (permalink / raw)
  To: nvdimm; +Cc: Dan Williams, corsepiu, linux-cxl, Vishal Verma

Update scripts/prepare-release and scripts/do_abidiff to use meson, and
change the expected branch name from 'master' to 'main'.

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 scripts/do_abidiff         | 14 ++++++--------
 scripts/prepare-release.sh | 24 ++++++++++++------------
 2 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/scripts/do_abidiff b/scripts/do_abidiff
index ec3e344..cb60e23 100755
--- a/scripts/do_abidiff
+++ b/scripts/do_abidiff
@@ -17,13 +17,11 @@ build_rpm()
 	local version=""
 
 	# prepare ndctl tree
-	rm -rf results_ndctl
+	rm -rf results_ndctl build
 	git checkout -b rel_${ref} $ref
-	./autogen.sh
-	./configure CFLAGS='-g -O2' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64
-	make clean
-	make rhel/ndctl.spec
-	cp rhel/ndctl.spec .
+	meson setup build
+	meson compile -C build rhel/ndctl.spec
+	cp build/rhel/ndctl.spec .
 
 	# build and copy RPMs
 	version="$(./git-version)"
@@ -46,8 +44,8 @@ build_rpm()
 do_diff()
 {
 	local pkg="$1"
-	local old_base="$(find . -regex "./release/rel_${old}/${pkg}-[0-9]+.*" | head -1)"
-	local new_base="$(find . -regex "./release/rel_${new}/${pkg}-[0-9]+.*" | head -1)"
+	local old_base="$(find . -regex "./release/rel_${old}/${pkg}[-cli]*-[0-9]+.*" | head -1)"
+	local new_base="$(find . -regex "./release/rel_${new}/${pkg}[-cli]*-[0-9]+.*" | head -1)"
 	local old_dev="$(find . -regex "./release/rel_${old}/${pkg}-devel-[0-9]+.*" | head -1)"
 	local new_dev="$(find . -regex "./release/rel_${new}/${pkg}-devel-[0-9]+.*" | head -1)"
 	local old_lib="$(find . -regex "./release/rel_${old}/${pkg}-libs-[0-9]+.*" | head -1)"
diff --git a/scripts/prepare-release.sh b/scripts/prepare-release.sh
index 8901b50..c8f54dc 100755
--- a/scripts/prepare-release.sh
+++ b/scripts/prepare-release.sh
@@ -6,7 +6,7 @@
 
 # Notes:
 #  - Checkout to the appropriate branch beforehand
-#     master - for major release
+#     main - for major release
 #     ndctl-xx.y - for fixup release
 #    This is important for generating the shortlog
 #  - Add a temporary commit that updates the libtool versions as needed.
@@ -50,9 +50,9 @@ check_branch()
 			err "expected an ndctl-xx.y branch for fixup release"
 		fi
 	else
-		# major release, expect master branch
-		if ! grep -Eq "^master$" <<< "$cur"; then
-			err "expected master branch for a major release"
+		# major release, expect main branch
+		if ! grep -Eq "^main$" <<< "$cur"; then
+			err "expected main branch for a major release"
 		fi
 	fi
 	if ! git diff-index --quiet HEAD --; then
@@ -99,7 +99,7 @@ gen_lists()
 	c_count=$(git log --pretty=format:"%s" "$range" | wc -l)
 }
 
-# Check libtool versions in Makefile.am.in
+# Check libtool versions in meson.build
 # $1: lib name (currently libndctl, libdaxctl, or libcxl)
 check_libtool_vers()
 {
@@ -107,13 +107,13 @@ check_libtool_vers()
 	local lib_u="${lib^^}"
 	local libdir="${lib##lib}/lib/"
 	local symfile="${libdir}/${lib}.sym"
-	local last_cur=$(git show $last_ref:Makefile.am.in | grep -E "^${lib_u}_CURRENT" | cut -d'=' -f2)
-	local last_rev=$(git show $last_ref:Makefile.am.in | grep -E "^${lib_u}_REVISION" | cut -d'=' -f2)
-	local last_age=$(git show $last_ref:Makefile.am.in | grep -E "^${lib_u}_AGE" | cut -d'=' -f2)
+	local last_cur=$(git show $last_ref:meson.build | grep -E "^${lib_u}_CURRENT" | cut -d'=' -f2)
+	local last_rev=$(git show $last_ref:meson.build | grep -E "^${lib_u}_REVISION" | cut -d'=' -f2)
+	local last_age=$(git show $last_ref:meson.build | grep -E "^${lib_u}_AGE" | cut -d'=' -f2)
 	local last_soname=$((last_cur - last_age))
-	local next_cur=$(git show HEAD:Makefile.am.in | grep -E "^${lib_u}_CURRENT" | cut -d'=' -f2)
-	local next_rev=$(git show HEAD:Makefile.am.in | grep -E "^${lib_u}_REVISION" | cut -d'=' -f2)
-	local next_age=$(git show HEAD:Makefile.am.in | grep -E "^${lib_u}_AGE" | cut -d'=' -f2)
+	local next_cur=$(git show HEAD:meson.build | grep -E "^${lib_u}_CURRENT" | cut -d'=' -f2)
+	local next_rev=$(git show HEAD:meson.build | grep -E "^${lib_u}_REVISION" | cut -d'=' -f2)
+	local next_age=$(git show HEAD:meson.build | grep -E "^${lib_u}_AGE" | cut -d'=' -f2)
 	local next_soname=$((next_cur - next_age))
 	local soname_diff=$((next_soname - last_soname))
 
@@ -195,6 +195,6 @@ sed -i -e "s/DEF_VER=[0-9]\+.*/DEF_VER=${next_ref#v}/" git-version
 echo "Ready to release ndctl-$next_ref with $c_count new commits."
 echo "Add git-version to the top commit to get the updated version."
 echo "Use release/commits and release/shortlog to compose the release message"
-echo "The release commit typically contains the Makefile.am.in libtool version"
+echo "The release commit typically contains the meson.build libtool version"
 echo "update, and the git-version update."
 echo "Finally, ensure the release commit as well as the tag are PGP signed."
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [ndctl PATCH 0/2] misc RPM / release scripts fixes
  2022-08-29 23:41 [ndctl PATCH 0/2] misc RPM / release scripts fixes Vishal Verma
  2022-08-29 23:41 ` [ndctl PATCH 1/2] ndctl.spec.in: Address misc. packaging bugs (RHBZ#2100157) Vishal Verma
  2022-08-29 23:41 ` [ndctl PATCH 2/2] scripts: update release scripts for meson Vishal Verma
@ 2022-09-22 16:23 ` Dan Williams
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Williams @ 2022-09-22 16:23 UTC (permalink / raw)
  To: Vishal Verma, nvdimm; +Cc: Dan Williams, corsepiu, linux-cxl, Vishal Verma

Vishal Verma wrote:
> Add a couple of fixes to the RPM spec to correctly claim ownership of
> config directories, and updates to release scripts for meson.
> 
> Vishal Verma (2):
>   ndctl.spec.in: Address misc. packaging bugs (RHBZ#2100157)
>   scripts: update release scripts for meson
> 
>  ndctl.spec.in              |  8 +++++++-
>  scripts/do_abidiff         | 14 ++++++--------
>  scripts/prepare-release.sh | 24 ++++++++++++------------
>  3 files changed, 25 insertions(+), 21 deletions(-)

Looks good to me:

Reviewed-by: Dan Williams <dan.j.williams@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-22 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29 23:41 [ndctl PATCH 0/2] misc RPM / release scripts fixes Vishal Verma
2022-08-29 23:41 ` [ndctl PATCH 1/2] ndctl.spec.in: Address misc. packaging bugs (RHBZ#2100157) Vishal Verma
2022-08-29 23:41 ` [ndctl PATCH 2/2] scripts: update release scripts for meson Vishal Verma
2022-09-22 16:23 ` [ndctl PATCH 0/2] misc RPM / release scripts fixes Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).