\n
Entry in BDF for successful build (sensitive info redacted, "point" entry for git commit point removed, but I've confirmed they match for each build):
\nname: sh_doc\n repo:\n uri: ssh://git@code.xxxxxxxx.net:#####/doctest/sh_doc.git\n branch: <release-codename>_<##.##>\n point: <removed>\n scm: git\n
\nEntry in BDF for failed build:
\nname: sh_doc\n repo:\n uri: ssh://git@code.xxxxxxxx.net:#####/doctest/help-newrepo.git\n branch: <product>-<##.##>.x\n point: xxxxxxxxxxxxbaf0a06c2ff0e622bd3fa88187\n scm: git\n
\nBuilds pointed to the new drop location fail. Looking into the build logs, I see this message (sensitive info redacted):
\n[08/10 13:42:42.298] DEBUG requests.packages.urllib3.connectionpool: “GET /projects/doctest/repos/help-newrepo/raw/sh_doc.spec?at=xxxxxxxxxxbaf0a06c2ff0e622bd3fa88187 HTTP/1.1” **401** 3514\n
\nThe message occurs in this wider context:
\n[08/10 13:42:42.125] DEBUG BitbucketGitRepository: Fetching raw url: https://code.xxxxxxx.net/projects/doctest/repos/help-newrepo/raw/sh_doc.spec?at=xxxxxxxxxxbaf0a06c2ff0e622bd3fa88187\n[08/10 13:42:42.127] DEBUG BitbucketClient: For repo: ssh://git@code.xxxxxxx.net:#####/doctest/help-newrepo.git\n ['doctest', 'help-newrepo']\n[08/10 13:42:42.127] INFO requests.packages.urllib3.connectionpool: Starting new HTTPS connection (1): code.xxxxxxx.net\n[08/10 13:42:42.129] INFO requests.packages.urllib3.connectionpool: Starting new HTTPS connection (1): code.xxxxxxx.net\n/usr/lib/python2.6/site-packages/requests/packages/urllib3/util/ssl_.py:##: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.\n InsecurePlatformWarning\n[08/10 13:42:42.298] DEBUG requests.packages.urllib3.connectionpool: "GET /projects/doctest/repos/help-newrepo/raw/sh_doc.spec?at=xxxxxxxxxxxxbaf0a06c2ff0e622bd3fa88187 HTTP/1.1" 401 3514\n[08/10 13:42:42.302] DEBUG BitbucketGitRepository: Raw output failed. Falling back to local repo for sh_doc.spec\n[08/10 13:42:42.302] DEBUG BitbucketGitRepository: Initializing new repo: /tmp/tmpXXXXXRv-bannow-repos/help-newrepo.git\n
\nContents of the spec file:
\nName:sh_doc\nVersion:0.1\nRelease:1%{?dist}\nSummary:SH documentation\nLicense:proprietary\nSource: %{name}-%{version}.tar.gz\nAutoreq: 0\n\n%define _prefix /opt/tms/web2/html\n\n%define debug_package %{nil}\n\n%description\nHolder for SH docs\n\n%prep\n%setup -q\n\n%build\n\n%install\nrm -rf $RPM_BUILD_ROOT\n\ndirs="\\\nhelp_xx \\\n"\n\nsrcdir=$RPM_BUILD_DIR/%{name}-%{version}\ntgtdir=$RPM_BUILD_ROOT/%{_prefix}\n\nfor dir in $dirs ; do\n mkdir -p $tgtdir/${dir}gz\n (cd $srcdir/$dir ; tar cf - . --exclude=.svn --exclude=.git) | (cd $tgtdir/${dir}gz ; tar xvf -; find $tgtdir/${dir}gz -type f ! -name '*.gz' -exec gzip -9 "{}" \\;)\ndone\n\n%files\n%defattr(-,root,root,-)\n%{_prefix}/help_xxgz\n
\n","author":{"@type":"Person","name":"solarcodex"},"upvoteCount":0,"answerCount":1,"acceptedAnswer":null}}Reputation: 1
My team recently moved our in-product help drop locations to git, where we now also manage our source content files. Two text files are needed to get our packages into the product build: an empty "write_tar" and a specification file "sh_doc.spec".
Our previous drop locations were in SVN\branches<drop-folder> where the folder name always used the format <release-codename>_<release #.#>.
Our new locations in git are separate repositories, one for each product. We create a branch in the repo for the drop, and name the branch with this format: <product>-<major.minor-version#>.x.
I've confirmed that the working test repo and our new repos are set up with the same SSH keys needed to communicate with the build system (a Jenkins system).
I've been successful creating builds in a test project with drop repository named "sh_doc" and branch name using the old format: <release-codename>_<release #.#>
But our "official" new drop locations are repos named with this format: help-<product-name>. I need to get builds to work with those repos, and I think I need to change something in the spec file to accomplish that, but I don't know what to change. The script was written by someone no longer with our team.
Entry in BDF for successful build (sensitive info redacted, "point" entry for git commit point removed, but I've confirmed they match for each build):
name: sh_doc
repo:
uri: ssh://git@code.xxxxxxxx.net:#####/doctest/sh_doc.git
branch: <release-codename>_<##.##>
point: <removed>
scm: git
Entry in BDF for failed build:
name: sh_doc
repo:
uri: ssh://git@code.xxxxxxxx.net:#####/doctest/help-newrepo.git
branch: <product>-<##.##>.x
point: xxxxxxxxxxxxbaf0a06c2ff0e622bd3fa88187
scm: git
Builds pointed to the new drop location fail. Looking into the build logs, I see this message (sensitive info redacted):
[08/10 13:42:42.298] DEBUG requests.packages.urllib3.connectionpool: “GET /projects/doctest/repos/help-newrepo/raw/sh_doc.spec?at=xxxxxxxxxxbaf0a06c2ff0e622bd3fa88187 HTTP/1.1” **401** 3514
The message occurs in this wider context:
[08/10 13:42:42.125] DEBUG BitbucketGitRepository: Fetching raw url: https://code.xxxxxxx.net/projects/doctest/repos/help-newrepo/raw/sh_doc.spec?at=xxxxxxxxxxbaf0a06c2ff0e622bd3fa88187
[08/10 13:42:42.127] DEBUG BitbucketClient: For repo: ssh://git@code.xxxxxxx.net:#####/doctest/help-newrepo.git
['doctest', 'help-newrepo']
[08/10 13:42:42.127] INFO requests.packages.urllib3.connectionpool: Starting new HTTPS connection (1): code.xxxxxxx.net
[08/10 13:42:42.129] INFO requests.packages.urllib3.connectionpool: Starting new HTTPS connection (1): code.xxxxxxx.net
/usr/lib/python2.6/site-packages/requests/packages/urllib3/util/ssl_.py:##: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
[08/10 13:42:42.298] DEBUG requests.packages.urllib3.connectionpool: "GET /projects/doctest/repos/help-newrepo/raw/sh_doc.spec?at=xxxxxxxxxxxxbaf0a06c2ff0e622bd3fa88187 HTTP/1.1" 401 3514
[08/10 13:42:42.302] DEBUG BitbucketGitRepository: Raw output failed. Falling back to local repo for sh_doc.spec
[08/10 13:42:42.302] DEBUG BitbucketGitRepository: Initializing new repo: /tmp/tmpXXXXXRv-bannow-repos/help-newrepo.git
Contents of the spec file:
Name:sh_doc
Version:0.1
Release:1%{?dist}
Summary:SH documentation
License:proprietary
Source: %{name}-%{version}.tar.gz
Autoreq: 0
%define _prefix /opt/tms/web2/html
%define debug_package %{nil}
%description
Holder for SH docs
%prep
%setup -q
%build
%install
rm -rf $RPM_BUILD_ROOT
dirs="\
help_xx \
"
srcdir=$RPM_BUILD_DIR/%{name}-%{version}
tgtdir=$RPM_BUILD_ROOT/%{_prefix}
for dir in $dirs ; do
mkdir -p $tgtdir/${dir}gz
(cd $srcdir/$dir ; tar cf - . --exclude=.svn --exclude=.git) | (cd $tgtdir/${dir}gz ; tar xvf -; find $tgtdir/${dir}gz -type f ! -name '*.gz' -exec gzip -9 "{}" \;)
done
%files
%defattr(-,root,root,-)
%{_prefix}/help_xxgz
Upvotes: 0
Views: 23
Reputation: 6758
Somehow the old build scripts were creating a file that matched this format:
Source: %{name}-%{version}.tar.gz
You need to tweak the build script to have it create that tarball from git
instead of svn
.
I don't think this is an RPM problem.
Upvotes: 0