Closed Bug 845566 Opened 12 years ago Closed 12 years ago

reorganize the JSS HG repository

Categories

(JSS Graveyard :: Library, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: KaiE, Assigned: KaiE)

Details

Attachments

(4 files, 1 obsolete file)

Several months ago, we had discussed and agreed to reorganize the contents of the JSS source repository, as part of the migration from CVS to HG. I will attach a series of files that shows the suggested changes in order. After the reorg, the repo will contain the following files in the toplevel: ./rules.mk ./jss.html ./Makefile ./manifest.mn ./build_java.pl And the following directories: ./org ./config ./coreconf ./pkg ./lib ./samples
Attached patch patch: fix testsSplinter Review
Attached patch patch: fix build (obsolete) — Splinter Review
Christina, this bug proposes to adjust the layout of the files in the JSS repo. The motivation is: Because JSS now has its own repo, the "security/jss" prefix is unnecessary. You can look at an example of the new proposed repo at http://nss-crypto.org/hg/jss-playground/file/8569266d07cf I will apply these modifications if you agree to them.
(In reply to Kai Engert (:kaie) from comment #6) > http://nss-crypto.org/hg/jss-playground/file/8569266d07cf Clarification: This isn't the final place for the new repo. It's just a temporary location.
Comment on attachment 718704 [details] [diff] [review] patch: fix build This is no longer necessary, because we are keeping the jss name.
Attachment #718704 - Attachment is obsolete: true
Attachment #718700 - Flags: review+
Attachment #718701 - Flags: review+
Attachment #718702 - Flags: review+
Comment on attachment 718703 [details] [diff] [review] patch: fix tests Review of attachment 718703 [details] [diff] [review]: ----------------------------------------------------------------- ::: org/mozilla/jss/tests/all.pl @@ +224,4 @@ > # $all_dir = Directory where all.pl is > my $all_dir = dirname($0); > # Find where mozilla directory is > + my $base_mozilla = $all_dir . "/../../../../.."; It seems that we should go just four levels up in the new directory hierarchy. "mozilla/security/jss" becomes "jss", so we should chop off two levels from "/../../../../../..".
Attachment #718703 - Flags: review+
Comment on attachment 718702 [details] [diff] [review] patch: adjust makefiles for new hierarchy Review of attachment 718702 [details] [diff] [review]: ----------------------------------------------------------------- ::: build_java.pl @@ +228,4 @@ > ensure_dir_exists($class_dir); > print_do("$javac $javac_opt_flag -sourcepath . -d $class_dir " . > "$classpath " . join(" ",@source_list)); > + print_do("sh -c 'pwd && cd $class_dir && pwd && rm -f $class_jar && pwd && ls -al && ls -al ../../dist && $jar -cvmf ../../jss/$manifest_file ../$class_jar *'"); Should we remove "jss" from "../../jss/$manifest_file"? But that still seems wrong, because in the new directory hierarchy ../.. doesn't make sense. ::: manifest.mn @@ +24,4 @@ > nspr20/v4.7 \ > $(NULL) > > +DIRS = coreconf \ Why do we need to add 'coreconf' to DIRS? Right now we are relying on the build_coreconf target in Makefile to build inside coreconf. We should continue to do that. Alternatively, we should remove the build_coreconf target.
(In reply to Wan-Teh Chang from comment #9) > ::: org/mozilla/jss/tests/all.pl > @@ +224,4 @@ > > # $all_dir = Directory where all.pl is > > my $all_dir = dirname($0); > > # Find where mozilla directory is > > + my $base_mozilla = $all_dir . "/../../../../.."; > > It seems that we should go just four levels up in the > new directory hierarchy. > > "mozilla/security/jss" becomes "jss", so we should > chop off two levels from "/../../../../../..". No. This is about finding the "parent directory of dist and tests_results". We used to have mozilla/security/jss mozilla/dist mozilla/tests_results Now we have workarea/jss workarea/dist workarea/tests_results That means, the directories used to be found two levels above jss. Now they are one level above jss. That's why the patch only removes one level.
(In reply to Wan-Teh Chang from comment #10) > ::: build_java.pl > @@ +228,4 @@ > > ensure_dir_exists($class_dir); > > print_do("$javac $javac_opt_flag -sourcepath . -d $class_dir " . > > "$classpath " . join(" ",@source_list)); > > + print_do("sh -c 'pwd && cd $class_dir && pwd && rm -f $class_jar && pwd && ls -al && ls -al ../../dist && $jar -cvmf ../../jss/$manifest_file ../$class_jar *'"); > > Should we remove "jss" from "../../jss/$manifest_file"? > > But that still seems wrong, because in the new directory hierarchy > ../.. doesn't make sense. It works correctly. It might help to understand by looking at the output of the above command. Note that it contains a "cd" command which resolves to cd ./../dist/classes_DBG so our pwd is workarea/dist/classes_DBG That's the way the old code worked, executing commands from below the dist directory. That's why it needs to find the path to the jss directory. The output of above command is: /pd/moz/nss/hg/jss /pd/moz/nss/hg/dist/classes_DBG /pd/moz/nss/hg/dist/classes_DBG total 12 drwxrwxr-x 3 kaie kaie 4096 Mar 1 12:22 . drwxrwxr-x 6 kaie kaie 4096 Mar 1 12:22 .. drwxrwxr-x 3 kaie kaie 4096 Mar 1 12:22 org total 24 drwxrwxr-x 6 kaie kaie 4096 Mar 1 12:22 . drwxrwxr-x 6 kaie kaie 4096 Feb 28 14:56 .. drwxrwxr-x 3 kaie kaie 4096 Mar 1 12:22 classes_DBG drwxrwxr-x 5 kaie kaie 4096 Feb 28 14:56 Linux3.7_x86_64_glibc_PTH_64_DBG.OBJ drwxrwxr-x 5 kaie kaie 4096 Mar 1 12:21 private drwxrwxr-x 4 kaie kaie 4096 Feb 28 14:56 public added manifest adding: org/(in = 0) (out= 0)(stored 0%) adding: org/mozilla/(in = 0) (out= 0)(stored 0%) adding: .... > ::: manifest.mn > @@ +24,4 @@ > > nspr20/v4.7 \ > > $(NULL) > > > > +DIRS = coreconf \ > > Why do we need to add 'coreconf' to DIRS? In the past we had mozilla/security/jss mozilla/security/coreconf Now we have workarea/jss workarea/jss/coreconf In other words, coreconf is now a subdirectory of jss. Without that change, building jss/util fails, complaining about missing nsinstall. > Right now we are relying on the build_coreconf target > in Makefile to build inside coreconf. We should continue > to do that. Alternatively, we should remove the build_coreconf > target. That works, I've removed it.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: