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

Don't depend on git being installed. Switch to portable find #1512

Closed
wants to merge 1 commit into from
Closed

Conversation

derekschrock
Copy link
Contributor

No description provided.

Portable listing of Tmain and Units directories
@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.373% when pulling 6268652 on derekschrock:no-git into 5567535 on universal-ctags:master.

@masatake
Copy link
Member

I have many test cases that are not added to git repository.
Your patch adds them to makefiles/test-cases.mak. None may want them.

@derekschrock
Copy link
Contributor Author

If I understand your comment you're saying you have other tests in your local tree that you don't want to be included? If so would it be best for you to have these else where? How can anyone take into account your local tree vs what is in the remote repo.

@masatake
Copy link
Member

If I understand your comment you're saying you have other tests in your local tree that you don't want to be included?

Yes.

If so would it be best for you to have these else where?

I don't think so.

How can anyone take into account your local tree vs what is in the remote repo.

These conflicts are reported by git each time when git pull or git checkout.

I don't understand why you need this kind of portability.
I think you are using git for getting source file of u-ctags. So you may have git.
Could you tell me the background of this patch?

@derekschrock
Copy link
Contributor Author

derekschrock commented Jul 24, 2017 via email

@masatake
Copy link
Member

git is needed when you get source code from git.
I guess the environment(E1) where getting the source code and environemnt(E2) where running make are different in your case.

In such case you should do run "make dist" in E1. You will get a tar.gz file. Then copy the tar.gz file to E2.
In the E2 you don't need git to build a binary.

If we release a tar ball, you don't need such step. However, I'm working for releasing but the official tar ball is not available yet.

In the process of porting universal-ctags to a FreeBSD port this was one issue I ran in to. It's possible this can be ignored since this is used to generate distfiles and not critical for building the software?

I think so but I have nerver tested such condition.

It's also possible to include git in as a build dependency in the port however it seems like overkill when you can get the same data via portable POSIX utilities. This was the reason for the patch.

Such dependency is needed because you try to build ctags from code taken from git repository.
If this project releases official tar.gz, you don't need such dependency.

Do you feel it's safe to use ignore makefiles/test-cases.mak, by either commenting it out in Makefile.am or making it an empty file, in the FreeBSD port?

I feel it is safe.

@derekschrock
Copy link
Contributor Author

derekschrock commented Jul 24, 2017 via email

@masatake
Copy link
Member

I see what happens on your side. How about following patch?

diff --git a/misc/dist-test-cases b/misc/dist-test-cases
index f09e9cf..d520a42 100755
--- a/misc/dist-test-cases
+++ b/misc/dist-test-cases
@@ -8,7 +8,10 @@
 echo "# -*- makefile -*-"
 echo "# Generated by $0" &&
 echo "EXTRA_DIST += misc/units \\" &&
-git ls-files | grep 'Units\|Tmain' | sed -e 's/$/\\/' -e 's/^/    /' &&
-echo '$(NULL)' &&
-
+if type git > /dev/null 2>&1; then
+    git ls-files | grep 'Units\|Tmain' | sed -e 's/$/\\/' -e 's/^/    /' &&
+	echo '$(NULL)'
+else
+    echo '$(NO_GIT_EMPTY)'
+fi &&
 exit $?

@derekschrock
Copy link
Contributor Author

derekschrock commented Jul 24, 2017 via email

masatake added a commit to masatake/ctags that referenced this pull request Jul 25, 2017
Close universal-ctags#1512

This is base on the pull request submitted by @derekschrock as universal-ctags#1512.

Quoted from the discussion at universal-ctags#1512:

    No, you can download tarballs of a given commit via github from a
    direct URL. FreeBSD's port infrastructure doesn't use git to download
    github (or gitlab) repos. They're direct URLs so normal checksum
    validation can still occur. Versioning can be a little odd sometimes
    with non-tagged releases (rolling release) but once you wrap your head
    around the idea it's pretty sane. For example:
    https://codeload.github.com/universal-ctags/ctags/tar.gz/5567535e Can
    be used to download universal-ctags/ctags commit 5567535. So git is
    not required inside a basic FreeBSD build environment to pull in
    upstream files for github sources. Just an http[s] client and checksum
    validation.

This change may help people building u-ctags from a tar ball taken from
https://codeload.github.com/universal-ctags/ctags/tar.gz/.
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.

3 participants