#432 Support rpkg resultsdir configuration
Merged 2 years ago by onosek. Opened 3 years ago by oturpe.
oturpe/fedpkg use-layout-rpmdefines  into  master

Use rpkg layouts for rpmdefines
Otto Urpelainen • 2 years ago  
@@ -46,8 +46,10 @@ 

    /*.src.rpm

    /build*.log

    /.build-*.log

+   results/

    results_*/

    clog

+ results_dir=root

  

  [fedpkg-stage.bodhi]

  # Refer to fedpkg.conf

@@ -46,8 +46,10 @@ 

    /*.src.rpm

    /build*.log

    /.build-*.log

+   results/

    results_*/

    clog

+ results_dir=root

  

  [fedpkg.bodhi]

  # This is for the bodhi-client 2.x, that do not require an option to switch to

file modified
+6 -5
@@ -188,11 +188,12 @@ 

              raise pyrpkg.rpkgError('Could not find the release/dist from branch name '

                                     '%s\nPlease specify with --release' %

                                     self.branch_merge)

-         self._rpmdefines = ["--define '_sourcedir %s'" % self.path,

-                             "--define '_specdir %s'" % self.path,

-                             "--define '_builddir %s'" % self.path,

-                             "--define '_srcrpmdir %s'" % self.path,

-                             "--define '_rpmdir %s'" % self.path,

+         self._rpmdefines = ["--define '_sourcedir %s'" % self.layout.sourcedir,

+                             "--define '_specdir %s'" % self.layout.specdir,

+                             "--define '_builddir %s'" % self.layout.builddir,

+                             "--define '_srcrpmdir %s'" % self.layout.srcrpmdir,

+                             "--define '_rpmdir %s'" % self.layout.rpmdir,

+                             "--define '_rpmfilename %s'" % self.layout.rpmfilename,

                              "--define 'dist %%{?distprefix}.%s'" % self._disttag,

                              "--define '%s %s'" % (self._distvar,

                                                    self._distval),

Use rpkg layouts for rpmdefines

Earlier, rpkg's layout mechanism was bypassed and rpmdefines were set in a fixed way by fedpkg. This breaks the new results dir feature from https://pagure.io/rpkg/pull-request/540

Rpmdefines are changed to be read from selected layout here, including the new rpmfilename layout property.

Rpkg added support for new configuration option resultsdir in this rpkg commit. Default configuration is set: git_exclude to exclude the new results directory, and resultsdir option set of root, in order to preserve the current behavior by default and make the new subdir option opt-in.

NOTE: This change only works with a version of rpkg that includes the linked commit. The first working version will presumably be 1.63.

NOTE: I do not know what fedpkg-stage is and could not find any explanation either. Assuming it is some alternative version of fedpkg, I just set the new configuration identically for both.

EDIT: Ok, I found this blog post saying:

fedpkg-stage is identical to the regular fedpkg command, except it uses the staging configuration file

Should the staging configuration use the new option, i.e. results_dir=subdir?

rebased onto 26fa8a7

2 years ago

Commit 47579c5 fixes this pull-request

Pull-Request has been merged by onosek

2 years ago