What is the meaning for the aosp repo tool's manifest file having remote element with attribute fetch =".." - android-source

Ok so in the manifest file of android repo tool. After executing
repo init -u https://android.googlesource.com/platform/manifest
We have a .repo folder which contains a manifest folder inside which we have the default.xml which contains the info on which repos to pull.
According to https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md
for a remote the fetch should have the url which should be prefixed before every project.
But the default.xml's fetch fied contains
<remote name="aosp"
fetch=".."
review="https://android-review.googlesource.com/" />
shouldn't the fetch field be android.googlesource.com.

".." means the upper directory of the manifest. The manifest is host on https://android.googlesource.com with the directory "platform", the upper direcotory is ".". So ".." means "https://android.googlesource.com" here.

Related

Create a yum repository from Artifactory (containing rpm packages)

I want to create a yum repository from my Artifactory URL where I have various rpm packages available.
I created .repo file as below in /etc/yum.repos.d
[customrepo]
name=CustomRepository
baseurl=https://jfrogurl/postgres/13.01.0000
enabled=1
gpgcheck=0
After this when I type yum list I get the following error:
Error: Failed to download metadata for repo 'customrepo': repomd.xml parser error: Parse error at line: 32 (Opening and ending tag mismatch: meta line 0 and head)
Am I missing anything?
You need to make sure that the baseurl in yum.repos.d points to the path which contains the Yum repository metadata files.
From your question it looks like you are pointing to postgres/13.01.0000. You need to make sure that this path contains the metadata files.
By default the metadata is stored relative to the repository's root folder. In this case, Artifactory searches the entire repository for RPMs and saves the repodata directory at $REPO-KEY/repodata. You can control this behavior by configuring the RPM Metadata Folder Depth parameter.

Unity Gitignore not ignoring binary files

I have a problem with the .gitignore file in my Multiplayer Unity game project (consists of a game server and a client project in a single repository). The .gitignore file ignores most of the files, but not the binary files from the library artifacts.
Image of binary files showing in Github Desktop.
I know the .gitignore file works because if I remove it there is 30000 changed files and 8000 without removing it.
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
[Ll]ogs/
[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
# Gradle cache directory
.gradle/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta
# Unity3D generated file on crash reports
sysinfo.txt
# Builds
*.apk
*.aab
*.unitypackage
# Crashlytics generated file
crashlytics-build.properties
# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
Image of the repository folder with the 2 projects
hehe i think your answer is on the first line of the .gitignore
This .gitignore file should be placed at the root of your Unity project directory
All of those ignore paths without a preceeding / are only relative to the location of the .gitignore. It works like so:
Will ignore:
./Build/myBinary
Will not ignore:
./project1/Build/myBinary
./project2/Build/myBinary
Simplest solution is to duplicate your .gitignore and place one of each at the root of each project directory, not the repo directory.
Your directory should look like this:
myRepo
project1
.gitignore
Assets
...
project2
.gitignore
Assets
...
As mentioned, if files in these directories have already been committed they will need to be removed manually.
To be sure, assuming there are only binaries in this folders, try and delete them (from the Git index only, not from your disk), and check immediately (no commit needed) if your .gitignore applies.
cd /path/to/repo
git rm -r --cached path/to/folder/with/binaries/ # note the trailing slash
git check-ignore -v path/to/folder/with/binaries/aBinary # must be a file
If the last command does not return anything, then no .gitignore rule applies.

Pull GitHub repository using Bazel

I need to download an entire GitHub repository using Bazel. Since I'm quite new to this tool I'm not really sure how to achieve that.
My main idea is this:
write a custom repository rule in downloadgithubrepo.bzl (which is located in the project root just like the WORKSPACE file) such as:
def _impl(repository_ctx):
repository_ctx.download("url_to_zipped_github_repo", output='relative_path_to_output_file')
github = repository_rule(
implementation = _impl
and in the WORKSPACE file to write something like this:
load("//:downloadgithubrepo.bzl", "github")
and to invoke a build a BUILD file is needed (also located at the project root)
its contents are the following:
cc_library(
name = "testrun",
srcs = "main.c",
)
I had to add the main.c file otherwise the build is failing - that is one issue and the real issue is that this does not work, as in the build is passing but the GitHub repository is not downloaded.
Am I on the right path at all?? Has anyone done something like this before?
What you're looking might already be implemented in the new_git_repository repository rule, or the git_repository rule if the GitHub project already has Bazel BUILD files wired in.
If the GitHub project does not have BUILD files, a BUILD file is required when using new_git_repository. For example, if you want to depend on a file target (e.g. /foo/bar.txt) or rule target (e.g. a cc_library) in https://github.com/example/repository, and the repository does not have BUILD files, write these lines in your project's WORKSPACE file:
new_git_repository(
name = "example_repository",
remote = "https://github.com/example/repository.git",
build_file_content = """
exports_files(["foo/bar.txt"])
# you can also create targets
cc_library(
name = "remote_cc_library",
srcs = ["..."],
hdrs = ["..."],
)
""",
)
In your BUILD file, reference the external repository's targets using the # prefix:
cc_library(
name = "testrun",
srcs = ["main.c"],
data = ["#example_repository//:foo/bar.txt"],
deps = ["#example_repository//:remote_cc_library"],
)
When you run bazel build //:testrun, Bazel will..
Analyze the dependencies of //:testrun, which include the file main.c and targets from the external repository #example_repository.
Look up the WORKSPACE file for an external repository named example_repository, and finds the new_git_repository declaration.
Perform a git clone on the remote attribute specified in the example_repository declaration.
Write a BUILD file containing the build_file_content string at the project root of the cloned repository.
Analyze the targets #example_repository//:foo/bar.txt and #example_repository//:remote_cc_library
Build the dependencies, and hands them to your //:testrun cc_library.
Build //:testrun.
If the GitHub project does have BUILD files, you do not need to provide an BUILD file. You can refer to the targets directly after specifying the WORKSPACE dependency with git_repository:
git_repository(
name = "example_repository",
remote = "https://github.com/example/repository.git",
)
For more information, check out Bazel's documentation on External Repositories.

uDeploy does not include all sub-folders (wildcard not working)

On my uDeploy process, I created .zip file step.
After downloading artifacts, I want uDeploy to zip all files under base directory.
Base directory structure:
archive
sites
bin
*All binaries required*
Include option is set for **/* and I assume this wildcard should include all subdirectories to archive (.zip)
But after I run the process, I am getting following warning:
Working Directory: E:\CustomerFtp\Rel_1.0_20160418_122247\Artifacts
Base Directory: E:\CustomerFtp\Rel_1.0_20160418_122247\Artifacts\Archive
Zip file name: CustomerFtp.Archive.zip
Include: **/*
Exclude:
Update : false
Follow Symlinks: false
Case Sensitive: false
=================================
[zip] Warning: skipping zip archive E:\CustomerFtp\Rel_1.0_20160418_122247\Artifacts\CustomerFtp.Archive.zip because no files were included.
Am I missing something?
It is a sort of stupid, but even on Windows, looks like folder paths are case-sensitive for uDeploy.
So, I had to change folder name from archive to Archive, and problem get fixed.

how to create nuspec file in specific folder?

I tried to create .nuspec file in a different folder by giving path but
it is giving me error
Nuget.exe spec ..\MYDEMOFOLDER
Nuget.exe pack ..\MYDEMOFOLDER\MYPROJECT.csproj
pause
want to create MYPROJECT.nuspec in ..\MYDEMOFOLDER folder location
getting error to create nuspec file
The package ID '..\MYDEMOFOLDER' contains invalid characters. Examples of valid package IDs in
clude 'MyPackage' and 'MyPackage.Sample'.
Unfortunately nuget.exe spec doesn't work like that. It expects a package ID.
If you need to create a nuspec in a given folder, you will need to change to that directory.
pushd ..\MYDEMOFOLDER // switch to new directory (remember current)
nuget spec MYPROJECT // create MYPROJECT.nuspec file
nuget pack MYPROJECT.csproj // pack MYPROJECT.csproj
popd // return to previous directory
NOTE: If you're going to pack a project file, you don't need to create a nuspec file, as nuget will create one automatically.
navigate to the directory you want to create the file
download this nuget exe in the directory
cd to the directory on command line
use the command "nuget spec project.csproj"
check your directory for the generated nuspec file
Generate .nupkg file using below command
nuget pack MYPROJECT.csproj
change the .nupkg file extension to .zip.
Open the zip you will see the .nuspec file.
Dotnet has quite confusing similar arguments
--output
is used for output for build = input for nuget pack
/p:OutputPath=
is used as output folder of nuget pack itself
Example:
dotnet pack -c Release -p:PackageVersion=1.2.3 YourProject.csproj --no-build --output c:\outputofbuild /p:OutputPath=c:\outputfornuget