* [ndctl PATCH] rpmbuild: ensure the rpmbuild working directories are present @ 2017-11-22 22:00 Vishal Verma 2017-11-22 22:13 ` Dan Williams 0 siblings, 1 reply; 5+ messages in thread From: Vishal Verma @ 2017-11-22 22:00 UTC (permalink / raw) To: linux-nvdimm 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. Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> --- rpmbuild.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/rpmbuild.sh b/rpmbuild.sh index 4535b46..1dd1709 100755 --- a/rpmbuild.sh +++ b/rpmbuild.sh @@ -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 -- 2.14.3 _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [ndctl PATCH] rpmbuild: ensure the rpmbuild working directories are present 2017-11-22 22:00 [ndctl PATCH] rpmbuild: ensure the rpmbuild working directories are present Vishal Verma @ 2017-11-22 22:13 ` Dan Williams 2017-11-22 22:15 ` Verma, Vishal L 0 siblings, 1 reply; 5+ messages in thread From: Dan Williams @ 2017-11-22 22:13 UTC (permalink / raw) To: Vishal Verma; +Cc: linux-nvdimm@lists.01.org On Wed, Nov 22, 2017 at 2:00 PM, Vishal Verma <vishal.l.verma@intel.com> wrote: > 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. > > Cc: Dan Williams <dan.j.williams@intel.com> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> > --- > rpmbuild.sh | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/rpmbuild.sh b/rpmbuild.sh > index 4535b46..1dd1709 100755 > --- a/rpmbuild.sh > +++ b/rpmbuild.sh > @@ -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 Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ndctl PATCH] rpmbuild: ensure the rpmbuild working directories are present 2017-11-22 22:13 ` Dan Williams @ 2017-11-22 22:15 ` Verma, Vishal L 2017-11-22 23:49 ` Dan Williams 0 siblings, 1 reply; 5+ messages in thread From: Verma, Vishal L @ 2017-11-22 22:15 UTC (permalink / raw) To: Williams, Dan J; +Cc: linux-nvdimm@lists.01.org On Wed, 2017-11-22 at 14:13 -0800, Dan Williams wrote: > On Wed, Nov 22, 2017 at 2:00 PM, Vishal Verma <vishal.l.verma@intel.c > om> wrote: > > 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. > > > > Cc: Dan Williams <dan.j.williams@intel.com> > > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> > > --- > > rpmbuild.sh | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/rpmbuild.sh b/rpmbuild.sh > > index 4535b46..1dd1709 100755 > > --- a/rpmbuild.sh > > +++ b/rpmbuild.sh > > @@ -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 Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ndctl PATCH] rpmbuild: ensure the rpmbuild working directories are present 2017-11-22 22:15 ` Verma, Vishal L @ 2017-11-22 23:49 ` Dan Williams 2017-11-27 19:04 ` Verma, Vishal L 0 siblings, 1 reply; 5+ messages in thread From: Dan Williams @ 2017-11-22 23:49 UTC (permalink / raw) To: Verma, Vishal L; +Cc: linux-nvdimm@lists.01.org On Wed, Nov 22, 2017 at 2:15 PM, Verma, Vishal L <vishal.l.verma@intel.com> wrote: > > On Wed, 2017-11-22 at 14:13 -0800, Dan Williams wrote: >> On Wed, Nov 22, 2017 at 2:00 PM, Vishal Verma <vishal.l.verma@intel.c >> om> wrote: >> > 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. >> > >> > Cc: Dan Williams <dan.j.williams@intel.com> >> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> >> > --- >> > rpmbuild.sh | 1 + >> > 1 file changed, 1 insertion(+) >> > >> > diff --git a/rpmbuild.sh b/rpmbuild.sh >> > index 4535b46..1dd1709 100755 >> > --- a/rpmbuild.sh >> > +++ b/rpmbuild.sh >> > @@ -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? 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. > _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ndctl PATCH] rpmbuild: ensure the rpmbuild working directories are present 2017-11-22 23:49 ` Dan Williams @ 2017-11-27 19:04 ` Verma, Vishal L 0 siblings, 0 replies; 5+ messages in thread From: Verma, Vishal L @ 2017-11-27 19:04 UTC (permalink / raw) To: Williams, Dan J; +Cc: linux-nvdimm@lists.01.org On Wed, 2017-11-22 at 15:49 -0800, Dan Williams wrote: > On Wed, Nov 22, 2017 at 2:15 PM, Verma, Vishal L > <vishal.l.verma@intel.com> wrote: > > > > On Wed, 2017-11-22 at 14:13 -0800, Dan Williams wrote: > > > On Wed, Nov 22, 2017 at 2:00 PM, Vishal Verma <vishal.l.verma@int > > > el.c > > > om> wrote: > > > > 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. > > > > > > > > Cc: Dan Williams <dan.j.williams@intel.com> > > > > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> > > > > --- > > > > rpmbuild.sh | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > diff --git a/rpmbuild.sh b/rpmbuild.sh > > > > index 4535b46..1dd1709 100755 > > > > --- a/rpmbuild.sh > > > > +++ b/rpmbuild.sh > > > > @@ -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? > > 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. > > 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 Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-27 19:00 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-11-22 22:00 [ndctl PATCH] rpmbuild: ensure the rpmbuild working directories are present Vishal Verma 2017-11-22 22:13 ` Dan Williams 2017-11-22 22:15 ` Verma, Vishal L 2017-11-22 23:49 ` Dan Williams 2017-11-27 19:04 ` Verma, Vishal L
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.