lag-linaro commented on a change in pull request #40: Detect Arch Support
URL: https://github.com/apache/couchdb-pkg/pull/40#discussion_r240521673
 
 

 ##########
 File path: Makefile
 ##########
 @@ -154,10 +154,12 @@ build-rpm:
 
 # ######################################
 copy-pkgs:
-       -chmod a+rwx ../rpmbuild/RPMS/x86_64/couchdb-* ../couchdb/couchdb_* 
2>/dev/null
-       -mkdir -p pkgs/couch/$(DIST) && chmod 777 pkgs/couch/$(DIST)
-       -cp ../rpmbuild/RPMS/x86_64/couchdb-* pkgs/couch/$(DIST) 2>/dev/null
-       -cp ../couchdb/couchdb_* pkgs/couch/$(DIST) 2>/dev/null
+       if [ "$(shell arch)" = "x84_64" ]; then                                 
                \
 
 Review comment:
   Yes it makes sense, but unfortunately it does not work.
   
   Currently (even with the ARCH fix applied) we get:
   
   ```
   chmod -f a+rwx ../rpmbuild/RPMS/arm64/couchdb-* ../couchdb/couchdb_* 
2>/dev/null
   Makefile:158: recipe for target 'copy-pkgs' failed
   mkdir -p pkgs/couch/ubuntu-xenial && chmod 777 pkgs/couch/ubuntu-xenial
   make: [copy-pkgs] Error 1 (ignored)
   mkdir: cannot create directory 'pkgs/couch/ubuntu-xenial': Permission denied
   Makefile:158: recipe for target 'copy-pkgs' failed
   cp ../rpmbuild/RPMS/arm64/couchdb-* pkgs/couch/ubuntu-xenial 2>/dev/null
   make: [copy-pkgs] Error 1 (ignored)
   Makefile:158: recipe for target 'copy-pkgs' failed
   cp ../couchdb/couchdb_* pkgs/couch/ubuntu-xenial 2>/dev/null
   make: [copy-pkgs] Error 1 (ignored)
   make: [copy-pkgs] Error 1 (ignored)
   Makefile:158: recipe for target 'copy-pkgs' failed
   ```
   
   Which does not look like a successful run and will (at the very least) 
confuse people.
   
   To rub salt into the wounds, this run did actually fail for real, but this 
is masked by the ignored failures.  Since we change to user `jenkins` for the 
build, most of the file manipulations fail due to lack of permissions.  The 
default mode of `pkgs/couch` et. al is `rwxrwxr-x` and is owned by the current 
user `1000` in my case, where as user `jenkins` has a different UID, thus most 
of the above fails for real.
   
   I will submit a fixed-up patch which what I think it a reasonable (DRY) 
solution. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to