rpmbuild: ensure the rpmbuild working directories are present
Vishal Verma
maintainerPATCH 1/1 rpmbuild: ensure the rpmbuild working directories are present
The rpmbuild and make-git-snapshot assume that the various ~/rpmbuild/* directories are present. In case they weren't, git-archive would fail with something like:
/root/rpmbuild/SOURCES/ndctl-58.2.38.g8ad8f4c.tar.gz: No such file or directory
Add a 'mkdir -p' to make sure these directories are present.
--- rpmbuild.sh | 1 + 1 file changed, 1 insertion(+)
rpmbuild.sh +1 -0
@@ -1,5 +1,6 @@ #!/bin/bash pushd $(dirname $0) >/dev/null +mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} ./make-git-snapshot.sh popd > /dev/null rpmbuild -ba $(dirname $0)/rhel/ndctl.spec
Signature · 6 lines
2.14.3 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 19 lines · Vishal Verma
The rpmbuild and make-git-snapshot assume that the various ~/rpmbuild/* directories are present. In case they weren't, git-archive would fail with something like:
/root/rpmbuild/SOURCES/ndctl-58.2.38.g8ad8f4c.tar.gz: No such file or directoryAdd a 'mkdir -p' to make sure these directories are present.
Cc Dan Williams <[email protected]>Signed-off-by Vishal Verma <[email protected]>--- rpmbuild.sh | 1 + 1 file changed, 1 insertion(+)rpmbuild.sh +0
-0
rpmbuild.sh line 3
Quoted 3 lines
rpmbuild.sh +1
-0@@ -1,5 +1,6 @@ #!/bin/bash pushd $(dirname $0) >/dev/null +mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
Hmm, I'd rather run rpmdev-setuptree than create this directories manually, and going further I'd rather just keep the assumption that rpmdev-setuptree has already been run before this script is run.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Verma, Vishal L
maintainerQuoted 19 lines · Dan Williams
Quoted 17 lines · Vishal Verma
The rpmbuild and make-git-snapshot assume that the various ~/rpmbuild/*
directories are present. In case they weren't, git-archive would fail
with something like:
/root/rpmbuild/SOURCES/ndctl-58.2.38.g8ad8f4c.tar.gz: No such
file or directoryAdd a 'mkdir -p' to make sure these directories are present.
Cc Dan Williams <[email protected]>Signed-off-by Vishal Verma <[email protected]>--- rpmbuild.sh | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
rpmbuild.sh line 3
Quoted 8 lines
rpmbuild.sh +1
-0@@ -1,5 +1,6 @@ #!/bin/bash pushd $(dirname $0) >/dev/null +mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}Hmm, I'd rather run rpmdev-setuptree than create this directories manually, and going further I'd rather just keep the assumption that rpmdev-setuptree has already been run before this script is run.
We could do a test -d ~/rpmbuild/SOURCES or so, and if not found, then run rpmdev-setuptree?
We know we are about to write to that path, so if it doesn't exist, why not create it?
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 34 lines · Vishal L
Quoted 19 lines · Dan Williams
Quoted 17 lines · Vishal Verma
The rpmbuild and make-git-snapshot assume that the various ~/rpmbuild/*
directories are present. In case they weren't, git-archive would fail
with something like:
/root/rpmbuild/SOURCES/ndctl-58.2.38.g8ad8f4c.tar.gz: No such
file or directoryAdd a 'mkdir -p' to make sure these directories are present.
Cc Dan Williams <[email protected]>Signed-off-by Vishal Verma <[email protected]>--- rpmbuild.sh | 1 + 1 file changed, 1 insertion(+)Quoted 12 lines
rpmbuild.sh line 3
Quoted 8 lines
rpmbuild.sh +1
-0@@ -1,5 +1,6 @@ #!/bin/bash pushd $(dirname $0) >/dev/null +mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}Hmm, I'd rather run rpmdev-setuptree than create this directories manually, and going further I'd rather just keep the assumption that rpmdev-setuptree has already been run before this script is run.
Quoted 4 lines
We could do a test -d ~/rpmbuild/SOURCES or so, and if not found, then run rpmdev-setuptree?
We know we are about to write to that path, so if it doesn't exist, why not create it?
Because we expect to build into an initialized rpmbuild tree, and if it's not initialized failing seems appropriate. That said, I'm ok with your "test and call rpmdev-setuptree" proposal.
Quoted 1 line
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Verma, Vishal L
maintainerQuoted 46 lines · Dan Williams
Quoted 37 lines · Vishal L
Quoted 21 lines · Dan Williams
Quoted 18 lines · Vishal Verma
The rpmbuild and make-git-snapshot assume that the various ~/rpmbuild/*
directories are present. In case they weren't, git-archive would
fail
with something like:
/root/rpmbuild/SOURCES/ndctl-58.2.38.g8ad8f4c.tar.gz: No such
file or directoryAdd a 'mkdir -p' to make sure these directories are present.
Cc Dan Williams <[email protected]>Signed-off-by Vishal Verma <[email protected]>--- rpmbuild.sh | 1 + 1 file changed, 1 insertion(+)Quoted 13 lines
rpmbuild.sh line 3
Quoted 8 lines
rpmbuild.sh +1
-0@@ -1,5 +1,6 @@ #!/bin/bash pushd $(dirname $0) >/dev/null +mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}Hmm, I'd rather run rpmdev-setuptree than create this directories manually, and going further I'd rather just keep the assumption that
rpmdev-setuptree has already been run before this script is run.Quoted 6 lines
We could do a test -d ~/rpmbuild/SOURCES or so, and if not found, then
run rpmdev-setuptree?
We know we are about to write to that path, so if it doesn't exist, why
not create it?
Quoted 5 lines
Because we expect to build into an initialized rpmbuild tree, and if it's not initialized failing seems appropriate. That said, I'm ok with
your "test and call rpmdev-setuptree" proposal.Quoted 1 line
Actually rpmdev-setuptree will overwrite any rpmmacros file, so maybe it is best not to call it and risk changing users environments. I'll send a patch to check for it though, and if not found, print an error message and exit out.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm