Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use binding source for xmlstoredp.srvpgm #33

Closed
wants to merge 9 commits into from

Conversation

Justin-E-Taylor
Copy link
Contributor

I've changed the makefile to use the binding source when building xmlstoredp.srvpgm. I put the commands directly in that build, since there are other service programs and I felt changing them was out of scope.

ref #27

justin and others added 5 commits February 11, 2019 09:42
Signed-off-by: Justin Taylor <JUSTIN@intranet.lorencook.com>
Signed-off-by: Justin Taylor <JUSTIN@intranet.lorencook.com>
Signed-off-by: justin <justay@swbell.net>
The *SRVPGM is only used by a Db2 stored procedure, so the signature is irrelevant.

Signed-off-by: justin <justay@swbell.net>
Signed-off-by: justin <justay@swbell.net>
Signed-off-by: justin <justay@swbell.net>
@Justin-E-Taylor
Copy link
Contributor Author

It says there are conflicts for src/xmlstoredp.bnd, but I don't any difference.

Makefile.in Outdated
@@ -71,7 +71,9 @@ xmlcgi.pgm: xmlcgi.module $(COMMON)
system -q "CRTPGM PGM($(LIBRARY)/$(@:%.pgm=%)) MODULE($(^:%.module=$(LIBRARY)/%)) BNDSRVPGM(QHTTPSVR/QZSRCORE)" && touch $@

xmlstoredp.srvpgm: xmlstoredp.module $(COMMON)
system -q "CRTSRVPGM SRVPGM($(LIBRARY)/$(@:%.srvpgm=%)) MODULE($(^:%.module=$(LIBRARY)/%)) EXPORT(*ALL) ACTGRP(*CALLER)" && touch $@
(system -q 'CHKOBJ $(LIBRARY)/QSRVSRC *FILE' || system -q 'CRTSRCPF $(LIBRARY)/QSRVSRC') && touch $@
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already a rule to make a source physical file: https://github.com/IBM/xmlservice/blob/master/Makefile.in#L107-L108

You should instead, just add qsrvsrc.srcpf as a dependency of xmlstoredp.srvpgm, like here: https://github.com/IBM/xmlservice/blob/master/Makefile.in#L76

@kadler
Copy link
Member

kadler commented Mar 13, 2019

@Justin-E-Taylor you have conflicts because you have commits which add and modify xmlstoredp.bnd, but those changes are in the master branch already. I squashed those commits in PR #28, so git can't automatically de-dupe them during the merge, thus the conflicts. This problem can be avoided by always using a branch for pull requests and branching that from the upstream master branch. I'd recommend reading this guide, which walks through the general process: https://gist.github.com/Chaser324/ce0505fbed06b947d962

In addition, I also don't understand 8ff1321. Why does this commit exist?

@kadler
Copy link
Member

kadler commented Mar 13, 2019

You might also want to set your name and email in your git client as currently it's using your system user name and hostname: https://github.com/IBM/xmlservice/commit/6c500ac4b4d0e777030de7aa3c1aeb64d30c5beb.patch

From 6c500ac4b4d0e777030de7aa3c1aeb64d30c5beb Mon Sep 17 00:00:00 2001
From: justin <justin@w-01781.intranet.lorencook.com>    <----- HERE
Date: Mon, 11 Mar 2019 16:49:43 -0500
Subject: [PATCH] Use binding source for service pgm XMLSTOREDP.

Signed-off-by: justin <justay@swbell.net>

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

You can also set it just for this repository by passing --local instead of --global to git config.

Once setting your username and email, you can fix your latest commit with git commit --amend --reset-author. Fixing previous commits will require more machinery.

Signed-off-by: justin <justay@swbell.net>
@Justin-E-Taylor
Copy link
Contributor Author

I know basic Git, but I don't know what eGit is trying to do here. The only file that changed in the Makefile. I'll go back and check the Makefile reference the corrections you requested. If it's easier, can we just scrap this PR?

@kadler
Copy link
Member

kadler commented Mar 15, 2019

So the problem is that I combined the multiple commits from your previous PR in to 1 commit when I merged it and there's no way for git to know that the contents of those commits are the same, so it is trying to apply both sets of (duplicate) changes in to one history.

   A - B - C - D     <--- your/master
 /  \     /     \
M     \ /        E
 \     |        /
  ---- z -------     <---- upstream/master  

Above is a diagram of the problem, where you branched off master from M and added commits A, B, and C which were merged in #28 as a squashed z. You then added D to your master branch and are trying to merge it in to our master branch, but git doesn't know that A, B, and C are equivalent to z and is trying to re-do those operations again, ie. it's trying to make the above in to this:

M - z - A - B - C - D

The proper way to fix this is to do an interactive rebase, which would rewrite your current branch's history on top of master and you'd drop A, B, and C, since they are not needed:

M - z - D

Then everything would merge fine. I don't use eGit, but it looks like it has support for interactive rebases now: https://www.instructables.com/id/How-to-Rebase-Interactive-With-Eclipse-eGit/

@Justin-E-Taylor
Copy link
Contributor Author

Any tips on how to figure what's causing configure to fail?

-bash-4.3$ ./configure --lib JUSTIN
: No such file or directory

@kadler
Copy link
Member

kadler commented Mar 20, 2019

Do you have python3 on your PATH?

@Justin-E-Taylor
Copy link
Contributor Author

With the issues of this PR, I sync'd my repo with the official one. That's when my configure error started. My path shouldn't have changed. Here's what I have:
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin

@kadler
Copy link
Member

kadler commented Mar 20, 2019

Good, /QOpenSys/pkgs/bin is on the PATH, but it seems it can't find the python3 binary there. Do you not have the python3 package installed?

@Justin-E-Taylor
Copy link
Contributor Author

Python 3 is installed. I have production apps running it. I did interactive Python today via SSH. I guess I'll try and revert the sync I made with the official repo, since that's when the problem started.
Thanks

@kadler
Copy link
Member

kadler commented Mar 21, 2019

You could try bypassing the shebang line and just pass the script and arguments to the interpreter directly:

python3 configure.py --lib JUSTIN

@Justin-E-Taylor
Copy link
Contributor Author

I reverted the config file and it's working again.

Regarding creating QSRVSRC, I'm looking at moving that to %.module. There doesn't seem to be a way to put it on the xmlstoredp.srvpgm: line but not include it in the magic variables for the CRTSRVPGM.

Signed-off-by: justin <justay@swbell.net>
@Justin-E-Taylor
Copy link
Contributor Author

I think my latest commit addresses your requested changes.

@kadler
Copy link
Member

kadler commented Apr 3, 2019

Sorry, I've been dealing with issues with my laptop. I'll try to get to this shortly.

@Justin-E-Taylor
Copy link
Contributor Author

No worries. Take your time.

kadler added a commit that referenced this pull request Apr 24, 2019
@kadler
Copy link
Member

kadler commented Apr 24, 2019

Closed by 6c27eac

@kadler kadler closed this Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants